I wrote a simple bootloader program (doesn't do anything but jump to the application code in flash once a timer expires) and I am having trouble getting rtx to work in the application code. It gets to a point in os_sys_init()'s assembly code where it will stick. I also find that all my other interrupts do not work either, although the lst file that it is generated seems to be putting the applications vector tables in the correct place...any ideas?
Joe, Have you found a solution? I am bust integrating my bootloader with a RTX kernel and I have the same problem. The bootloader does the remapping of interrupts, but the call that you mentioned does not start the first task.
I did fix the problem. I used the NVIC Configuration to move my vector tables to the correct place. so i was putting my code at 0x8010000, so I used the following function:
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x10000);
You can check using the debugger that the vector table is in the right place in the beginning of the code. The first vector will be your stack pointer and the second vector will be the reset vector. The reset vector should be in the range of where you are putting your code, in my case it was 0x801013e or something like that.
Let me know if you have any more questions
joe
Joe, Thanks for your reply. This is my situation (LPC2478): I have a boot loader from 0x0 to 0x4000, and an application that starts at 0x4000. the bootloader remaps the vector table and copies the application vector into RAM. I jump to 0x4000 as expected, eventually enter 'main', call 'os_sys_init' and...that's it. of course the application does not use internal RAM from 0x40000000, but rather 0x40000020. did you do something special to handle SWIs...?
Joe, I got it. Added 'RAM_INTVEC REMAP RAM_MODE' to the ASM define tab of the application (even though the bootloader already remaps and copied. hmmmm. this approach (above) did not work without RTX!
Sounds like you are jumping to the beggining of the code space vice jumping to the reset vector. Your reset vector will be in the beginning of your code (we are using different micros), but your bootloader should read in the vector and jump to the address that is listed in the vector