We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I run a baremetal program on one core of the Cortex A9. The First Stage Bootloader (FSBL, Pre-Loader) and the Second Stage Bootloader (SSBL) perform perfectly. When the baremetal application (axf-file) is started in the debugger it executes without a problem. However when the baremetal application (bin-file) is exectued directly on the machine, the baremetal application cannot be started and the follwing error is thrown:
data abort
MAYBE you should read doc/README.arm-unligned-accesses
However, when the MMU is deactivated, the application (bin-file and axf-file) execute perfectly.
This leads me to the follwing questions:
Why can the program be started in the Debugger, and at the same time cause a data abort, when the binary is executed on the machine?
Why could the MMU cause a data abort, when the bin-file is started on the machine?
I would be grateful for any hints and tips. Many thanks in advance.
Deas
Hello Bastian,
I wrote a scatter file, for these declarations:
SDRAM 0x100000 0x03F00000 { VECTORS +0 { *(VECTORS, +FIRST) } APP_CODE +0 { *(+RO, +RW, +ZI) } ARM_LIB_STACKHEAP +0 EMPTY (0x3F000000 - ImageLimit(APP_CODE)) ; Application Heap and Stack {} }
The entry point of the application.bin is 0x00100000, which I checked with the command readelf -h application.axf.
Thanks for your support.
I take the liberty to just post the information about the elf-file.
readelf -h application.axf ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x100000 Start of program headers: 381792 (bytes into file) Start of section headers: 381824 (bytes into file) Flags: 0x5000402, Version5 EABI, hard-float ABI, <unknown> Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 1 Size of section headers: 40 (bytes) Number of section headers: 18 Section header string table index: 17