cancel
Showing results for 
Search instead for 
Did you mean: 

Booting and uploadnig to bank 1 using Keil

jkl
Associate II
Posted on April 04, 2007 at 06:13

Booting and uploadnig to bank 1 using Keil

7 REPLIES 7
jkl
Associate II
Posted on May 17, 2011 at 09:40

Anyone knows how to do this?

I have tried uploading a small program to bank 1 @ 0x400000. The Remap bit is set in the STR9xCFG.s file.

When debugging the processor correctly boots with bank 1 at address 0 but it tries to jump to addresses in bank 1 before remap (0x400000 and above)...

Anyone knows how to setup Keil so it boots and runs correct from bank 1?

jkl
Associate II
Posted on May 17, 2011 at 09:40

Hello, thx for the help.

I tried what you described, but in your example the code is downloaded to bank 0 and not bank 1... This is exactly my problem, if I enter the Bank 1 area in the Target dialog IROM1 the code will try to jump to locations in bank1 prior to remap. If I enter the Bank0 area in the IROM1 dialog the code will be uploaded to bank0 and not run after a remap...

Best regards,

Jakob

jkl
Associate II
Posted on May 17, 2011 at 09:40

Did anybody get boot from bank 1 working... Am I missing some setting in Keil?

nanuradha
Associate II
Posted on May 17, 2011 at 09:40

We are also faced same problem.But if we select chip select in cfg.s file we are not able to download.We are using keil MDkv3.05.We set 32k as boot bank.In startup code we have changed the boot bank size to 32k,addr as 0x0000000,NBBADR 0x00400000 NBBSR 512k.We selected ICP algorithm for programming there also we have changed the addressing range.With this configuration without chip select we are able to download and execute.But we are not sure that it is running from 32k only.And we are not able to debug also.Please help us if anybody have a solution.

Regards

Anu.

d_steffen
Associate II
Posted on May 17, 2011 at 09:40

Yes booting from bank 1 is working:

1.) you need the described points 1-5 from ibtiss (see above).

2.) in flashdownload configuration you need the settings from the attached

file.

d_steffen
Associate II
Posted on May 17, 2011 at 09:40

After remapping (CSX=1), booting from bank 1 (32 Kbyte, address 0)

the Keil Flash Algorithmen (MDK 3.05) are not able to download code in bank 0 (512 kByte, at address 0x400000 or another address).

Keil is working on a solution. I'm waiting also for this, may be

ist comming on next day's, then I'll inform you.

[ This message was edited by: Barricade on 03-04-2007 16:32 ]

jkl
Associate II
Posted on May 17, 2011 at 09:40

I got it working, but I have to cycle power to the device every time I have uploaded the flash, else Keil will give a flash error message.

When the power is cycled I am able to debug the boot bank, given that the code has not jumped to the second bank... Keil is not able to handle debug over multiple banks.

Also I had to remove the FMI register setup lines in the ST startup file in the non-boot bank (so the FMI registers are only set once in the boot bank startup code), else the code would jump back to the boot bank. I was not able to find some FMI register setup in the non-boot bank which worked..