I'm trying to compile the original LPC3000_NAND_SP algorithm using uVision3 but i receive different error messages.
First i received:
.\Output\LPC31xx_NAND_LP.axf: Error: L6265E: Non-RWPI Section flashprg.o(.data) cannot be assigned to PI Exec region PrgData.
.\Output\LPC31xx_NAND_LP.axf: Error: L6248E: flashprg.o(.text) in PI region 'PrgCode' cannot have address type relocation to .data in PI region 'PrgData'.
but after reading some other posts i saw that i need to switch the "Use Memory layout from target dialog" in Linker Options menu. After switching i received:
.\Output\LPC31xx_NAND_LP.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
and then i saw somewhere that i have to include IAP.S file with opcode "AREA RESET, CODE, READONLY END" at the top of the file.
----------- IAP.S -------------- AREA RESET, CODE, READONLY END ;AREA IAPEXE, CODE, READONLY
;void IAP_Execute (struct sIAP *pIAP); EXPORT IAP_Execute
IAP_Execute STMFD SP!,{LR} ; Save Return Address ADD R1,R0,#0x14 ; R0 = &IAP.cmd, R1 = &IAP.stat ADR LR,IAP_Exit ; Return Address LDR R2,=0x7FFFFFF1 ; IAP Entry (Thumb Mode) BX R2 ; Execute IAP Command
IAP_Exit LDMFD SP!,{LR} ; Restore Return Address MOV PC,LR ; Return
END -----------------------------------------------------
After compiling i receive: IAP.s(11): error: A1163E: Unknown opcode RESET, , expecting opcode or Macro IAP.s(18): error: A1105E: Area directive missing IAP.s(18): warning: A1088W: Faking declaration of area AREA |$$$$$$$|
If someone can help me will be nice
Regards, Stoyan Ruskov Ultraflex International