Hello,
I am trying to add some binary file to the final elf according to section
12.2.7.1.3 incbin
of "CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual"
Below is the the source of asm file:
.section .rodata
.global _flashBuf
_flashBuf:
.incbin "D:/Freescale/Projects/test-core00/Sources/flash.bin"
The final elf file contains the original data from binary "flash.bin" file of the correct size but with all bytes 0x0A changed to 0x0D. All other bytes except of 0x0A are not changed.
It looks like .incbin parses the binary file not as raw data, but as text,
The problem turned out to be in assembler: PA\PA_Tools\Command_Line_Tools\mwasmeppc.exe
It's a bug that the binary file by .incbin directive is opened as text and than function FixTextHandle called internally where all '\n' characters are replaced with '\r'.
In my case the mwasmeppc.exe file has the following version:
Freescale assembler for embedded PowerPC.
Version 4.3 build 303 Run time: June 16, 2015, 12:00:17 PM.
The version (Version 4.3 build 303 ) of mwasmeppc.exe is from CodeWarrior for PA 10.5.1, it is the latest version for PA architecture. I will report this bug to CodeWarrior development team.
Hi,
I have recompiled the project for each processor from the drop-down list:
e300v1, e300c2, e300c3, e300c4, e500e1, e500v2, e600 and generic processors.
The result is the same and does not depend on the specific processor.
Hi
Please let us know your chip part number thus we can assign this thread to the right engineer.
Thanks,
Jun Zhang