I am using an str912 and am trying to have stmicro’s in-application programming with uart load freeRTOS. The example binarys provided with IAP can load and run just fine but the binary I create with the freeRTOS project does not run. Has anybody gotten this to work for them? If so what changes did you need to make to the freeRTOS project?
I have successfully used bootloaders on Atmel parts and don’t recall anything special that needed to be done. When you start the application through the bootloader, does main() get called from Supervisor mode? Also, how are the interrupt vectors handled?
Yes the main does get called from supervisor mode. According to the in-application programmer documentation you should not have to do anything special with interrupts because bank0 is software remapped to address 0x00.
I have the same problem with FreeRtos. You cannot depure it because it crashes. I guess the solution is to make just one task and see if it works.
I have tried commenting out everything from the freeRTOS main function and popped in my own led flashing program. This worked with the stmicro bootloader. Adding back the freeRTOS stuff I found that the program stops working when I add back prvSetupHardware function. I thought this might be because of the FMI_BankRemapConfig call inside of the prvSetupHardware function but commenting that out did not fix the problem. Does anybody have any ideas about what could be causing this?
I have had the same problem like you.
I fixed it with these 4 steps:
- cut the PLL configuration code lines in prvSetupHardware from the main application in BANK 0
and paste it into a start sequence in the bootloader (main() of IAP) in BANK 1.
- also cut and paste the FMI_Config(xx) command in the same way.
- The FMI configuration (the lines with the 0x540000XX Registers)
of FREERTOS init (asssembler) file must change (or maybe could deleted?) to the right size and address
- Comment or delete the FMI_BankRemapConfig command in prvSetupHardware.
NOTE: The FREERTOS will not run if bootbank = bank0 !!
It works, but why? Why is it not possible to config pll after using a bootloader with bank-address-switch.
Have anybody a clue?