LPC2368 study notes (2), transplant ADS project

LPC2368 study notes (2), transplant ADS project

Recently, I am maintaining an LPC2368 control board. Since the software is developed using ADS, I also use ADS for maintenance work. Due to compatibility issues, ADS often gets stuck at critical moments, which makes me very painful during the maintenance process. So I want to port the program to MDK for maintenance.
The MDK new project adds files, and no problems are reported when compiling, but an error is reported when linking:

linking…
.\Objects\proj.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
Not enough information to list image symbols.
Not enough information to list the image map.

Since the project does not use the startup file that comes with MDK, I replace the startup file with the startup file that comes with MDK, and then compile it.
Or you can open the startup file of the original project to find the assembly code of the program entry, for example:

CODE32
AREA    vectors,CODE,READONLY
ENTRY

change it to

CODE32
AREA    RESET,CODE,READONLY
ENTRY

That's it.

meet

..\target\Startup.s(155): warning: A1876W: Use of ‘|’ as a synonym for
the :OR: operator is deprecated.

The alarm can be located in that line, change "|" to ":OR:", for example:

MSR     CPSR_c, #(SVC32Mode|NoFIQ)

change to

MSR     CPSR_c, #(SVC32Mode:OR:NoFIQ)

That's it.

meet

..\target\Startup.s(219): warning: A1608W: MOV pc, instruction
used, but BX is preferred

You can replace MOV pc, with BX
Example:
replace

MOV     PC, R0

replace with

BX      R0

But it becomes

MOVS    PC, R0

It does not seem to affect the compilation results.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325720698&siteId=291194637