Hello, All! I write bootloader using RL-FlashFS Library. It's work fine. But when i try to use RL-FlashFS functions in main program my LPC2367 is stoping(in ABORT MODE). Maybe i must locate RL-FlashFS functions on other part of RAM ??? Where is my mistake?
With best regards, Vladimir.
The point is: you have 2 programs that might use the same interrupt sources. Once the bootloader finishes, you never want the processor to use its vectors, but they are programmed into flash! Therefore, you want to remap the vector table so that future programing of the VIC to affect RAM, and the processor will fetch its vectors from RAM.
Tamir, i remaped interrupts vectors using: RAM_INTVEC REMAP RAM_MODE in ASM Define.(using interrupt vectors from RAM )
In code i add string: memcpy((char *)0x40000000, (char *)(0x000010000), 64); (copy interrupt table to start address of RAM)
In project for ROM set START Address : 0x00010000 In project for RAM set START Address : 0x40002000(instead 0x40001000)
And previous problem has gone. But second problem is appeared. But, when i try to use timer 0 interrupts in bootloader, these interrupt don't calling in main program. Maybe i don't really remap interrupt table and forget something???
Sorry, but i don't understand what you are saying.
"But, when i try to use timer 0 interrupts in bootloader, these interrupt don't calling in main program. Maybe i don't really remap interrupt table and forget something???"
Boot loader and main program is two separate things. The boot loader should has its own interrupt vector table and its own timer ISR (if it needs an interrupt-driven timer). And the main program should have a separate interrupt vector table (that gets copied to RAM and remapped) and corresponding ISR handlers.
Remove this. The startup code does this for you!
Tamir, sorry i just forget to stop timer and trying to reconfigure it in main program.