Keil™, An ARM® Company

Discussion Forum

Banking code does not work !

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Steven Young
Posted
15-Oct-2004 02:05 GMT
Toolset
C51
New! Banking code does not work !
I'm a user of a TP2808 MCU(128K Flash Rom),so I need to bank my code to 2.

For cost considering,I want to change my MCU with a cheaper one,STK6012(128K Flash Rom),which has the same pin difination with TP2808.I modified L51_bank.a51 for STK6012,and included it.

Why my code does not work !!

Steven Young
Read-Only
Author
Jon Ward
Posted
15-Oct-2004 16:03 GMT
Toolset
C51
New! RE: Banking code does not work !
Why my code does not work...

Without more information, it's impossible to answer your question.

It's like me saying, "My car stopped running yesterday. What's wrong with it?"

Jon
Read-Only
Author
Andrew Neil
Posted
15-Oct-2004 16:28 GMT
Toolset
C51
New! RE: Banking code does not work !
"Why my code does not work!!"

Has it ever worked?
Read-Only
Author
Andrew Neil
Posted
15-Oct-2004 16:30 GMT
Toolset
C51
New! RE: Banking code does not work !
"128K Flash Rom, so I need to bank my code"

Just because your micro has 128K Flash doesn't mean that you have to fill it with code!

Is your application code actually >64K?
Read-Only
Author
Steven Young
Posted
15-Oct-2004 19:47 GMT
Toolset
C51
New! RE: Banking code does not work !
Sorry for "My car stopped running yesterday. What's wrong with it?"







Of Course my code is larger than 64K,and my code runs properly with MCU TP2808.







Compiled successful with bank6012.a51 included.I used this bank6012.a51 in other project and caused no problems.












If anybody will help me out!Please tell me Your email or send a mail to netsheep@126.com,I'll send the whole project(Source code: 7MB)!




Thanks



Steven Young
Read-Only
Author
Ward Jon
Posted
15-Oct-2004 20:39 GMT
Toolset
C51
New! RE: Banking code does not work !
Here's a suggestion. Before you send someone a 7M file, take the code banking example we have which is VERY simple and try to make it work. The problem is probably with the L51_BANK.A51 file.

Jon
Read-Only
Author
Keil Support, Intl.
Posted
18-Oct-2004 07:25 GMT
Toolset
C51
New! RE: Banking code does not work !
Do you get any linker warnings or did you disable some linker warnings?
Read-Only
Author
Steven Young
Posted
18-Oct-2004 09:22 GMT
Toolset
C51
New! RE: Banking code does not work !
Just one linking warning:
*** WARNING L13: RECURSIVE CALL TO SEGMENT
SEGMENT: ?CO?LCD_OSD
CALLER: ?PR?_OSD_TV_PROC?LCD_OSD
But I think it's not the key.Because when I use TP2808,the warning remains,and the code runs well.

Steven Young
Read-Only
Author
Steven Young
Posted
18-Oct-2004 09:25 GMT
Toolset
C51
New! RE: Banking code does not work !
My warning setting is "Warning Level 2"

Thanks
Steven Young
Read-Only
Author
Keil Support, Intl.
Posted
18-Oct-2004 13:11 GMT
Toolset
C51
New! RE: Banking code does not work !
The warning 13 that you are getting indicates that you have function pointers in your program. Did you tell the linker about your real call tree as explained in the Assembler/Utilities User's Guide under Chapter 9, Data Overlaying. It is also esstial to tell the linker the call tree of code banking, since otherwise the interbank calls cannot be correctly inserted.
Read-Only
Author
Andrew Neil
Posted
18-Oct-2004 21:52 GMT
Toolset
C51
New! RE: Banking code does not work !
"the code runs well"

You mean you haven't seen it fail yet!

That's the thing about Warnings - they tell you that there's something dodgy about your code. It may well appear to be all fine - until one day it hits the particular circumstances where that dodginess bites you.

eg, if the bug affects your leap-year handling, it could appear to "run well" for a whole four years before the bug shows up...!
Read-Only
Author
Steven Young
Posted
19-Oct-2004 04:30 GMT
Toolset
C51
New! RE: Banking code does not work !
Thanks All.

And now I've modified my code.
until
"128MCUTV" - 0 Error(s), 0 Warning(s).
The problem remains.

I have asked the STK6012 FAE.He said it maybe the problem of hardware not software.

Thanks again
Steven Young

Next Thread | Thread List | Previous Thread Start a Thread | Settings