I got the code USB secondary ISP bootloader for LPC23xx from NXP working fine with none RTX kernel but It does not working with RTX kernel. If anyone know more detail please help.
Thank you.
Corrected version of above file is: rapidshare.com/.../non_RTX_bootloader_with_RTX_application_for_lpc2378.rar (This works with new RTX (from v3.40) of uVision). Old version is deleted from rapidshare.
Please note that in my case (in this example)
RAM_INTVEC REMAP RAM_MODE
ASM option for startup file does not remap IVT as Tamir Michael suggested. I have to say
memcpy((char *)0x40000000, (char *)(0x00002000), 64);
(see __rt_entry...)
This is part of startup file that has to do with those macros:
; Memory Mapping (when Interrupt Vectors are in RAM) MEMMAP EQU 0xE01FC040 ; Memory Mapping Control IF :DEF:REMAP LDR R0, =MEMMAP IF :DEF:RAM_MODE MOV R1, #2 ELSE MOV R1, #1 ENDIF STR R1, [R0] ENDIF
So uVision generated REMAP and RAM_MODE, but not a RAM_INTVEC part... And I guess that this is the reason why vectors are not remapped as in Tamir's case, but have to be copied manually in my case...
wait a minute. the following instructions should reside in your startup file, just above the code you quoted:
; Copy Exception Vectors to Internal RAM --------------------------------------- IF :DEF:RAM_INTVEC ADR R8, Vectors ; Source LDR R9, =RAM_BASE ; Destination LDMIA R8!, {R0-R7} ; Load Vectors STMIA R9!, {R0-R7} ; Store Vectors LDMIA R8!, {R0-R7} ; Load Handler Addresses STMIA R9!, {R0-R7} ; Store Handler Addresses ENDIF
I am using the remapping macros without a problem.
Exactly, that is missing! I copied this file from Keil... RAM_BASE, is undefined in my project. Can you please tell me from where did you copy your .s file? This one is Keil's, but is obviously missing something...
if you look at the lastest released LPC2400.s, line 61 looks like this:
RAM_BASE EQU 0x40000000
don't forget to bless your "rapidshare" clients with your findings :-)
Ave, Tamir!
This gave me a lot of headache! Startup file when I started my project was 20k. Today it is 37k. I jus needeed to copy .s file from "Keil\ARM\Startup\Philips\" to my project over old one and now everything is defined. I've read a bunch of documents searching why those macros won't work :)
Thanks once more!
You're welcome.
This is the final version of the example, all works as it should:
rapidshare.com/.../non_RTX_bootloader_with_RTX_application_for_lpc2378.rar
(all other links from above are deleted...)