a-lunev commented on issue #3737:
URL: 
https://github.com/apache/incubator-nuttx/issues/3737#issuecomment-846455304


   Hi @btashton  and @patacongo,
   
   After the symbol table creation was fixed for nxflat example, I tested 
`-mno-pic-data-is-text-relative` flag and it really helped, thank you!
   However, there is a hard fault for the "struct" test ("errno" and "hello" 
tests work well):
   ```
   $ qemu-system-arm -semihosting -M lm3s6965evb -netdev user,id=user0 -nic 
user,id=user0 -serial mon:stdio -kernel nuttx.bin
   Registering romdisk
   Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
   
   ****************************************************************************
   * Executing errno
   ****************************************************************************
   
   Wait a bit for test completion
   Hello, World on stdout
   Hello, World on stderr
   We failed to open "aflav-sautga-ay!" errno is 2
   
   ****************************************************************************
   * Executing hello
   ****************************************************************************
   
   Wait a bit for test completion
   Getting ready to say "Hello, world"
   
   Hello, world!
   It has been said.
   
   argc = 1
   argv = 0x0x20005130
   argv[0]      = (0x0x20005138) "<noname>"
   argv[1]      = 0x0
   Goodbye, world!
   
   ****************************************************************************
   * Executing struct
   ****************************************************************************
   
   Wait a bit for test completion
   Calling getstruct()
   getstruct returned 0x20004db0
     n = 42 (vs 42) PASS
     pn = 0x20004da4 (vs 0x20004da4) PASS
    *pn = 87 (vs 87) PASS
     ps = 0xde5c (vs 0xde5c) PASS
     ps->n = 117 (vs 117) PASS
     pf = 0xdcec (vs 0xdcec) PASS
   Calling mystruct->pf()
   arm_hardfault: PANIC!!! Hard fault: 40000000
   up_assert: Assertion failed at file:armv7-m/arm_hardfault.c line: 135
   up_registerdump: R0: 00000017 0000df4b 00007fff 0000dcec 20004db0 0000dcec 
00000000 00000000
   up_registerdump: R8: 00000000 00000000 20004d60 00000000 0000a0cf 20006218 
0000ddfd 0000dcec
   up_registerdump: xPSR: 60000000 PRIMASK: 00000000 CONTROL: 00000000
   up_registerdump: EXC_RETURN: fffffff9
   up_dumpstate: sp:         20006150
   up_dumpstate: stack base: 20005a58
   up_dumpstate: stack size: 000007e8
   up_stackdump: 20006140: 20005a58 20004e20 20002338 0000498f 00000000 
00000000 00000000 0000a0cf
   up_stackdump: 20006160: 20006218 0000ddfd 0000dcec 00004085 00000000 
0000dcea 0000e60b 200061cc
   up_stackdump: 20006180: 00000000 00000000 00000000 000036dd 0000d35c 
00000e59 00000e19 20002338
   up_stackdump: 200061a0: 00000003 00001137 00000004 00000c99 00000000 
200061cc 0000dcec 00000000
   up_stackdump: 200061c0: 00000000 00000295 20004fd8 20006218 00000000 
20004db0 0000dcec 00000000
   up_stackdump: 200061e0: 00000000 00000000 00000000 20004d60 00000000 
fffffff9 00000017 0000df4b
   up_stackdump: 20006200: 00007fff 0000dcec 0000a0cf 0000ddfd 0000dcec 
60000000 0000dd21 20004e20
   up_stackdump: 20006220: 0000dd21 000038dd 00000000 00001517 00000000 
00000000 00000000 00000000
   ```
   
   Do you have idea what the cause may be?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to