-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loading of ET_DYN shared object test to sotest #2026
Conversation
@nealef please fix the ci warning, you can run the check locally by:
|
We need to fix CI build first |
|
Where was this error? I build |
I copied that error message from CI failure log |
What I've found is when
But for
This is due to the settings of various flags in |
Made the changes and get a clean build but when I build and run
So I am wondering if I need to run it on something else? My Mac isn't an option either as there's no support for 32-bit. |
@nealef please fix the build error reported by ci. |
That was supposed to be fixed by an earlier commit that changed SHLDMODULEFLAGS to SHMODULEDLAGS. It was clean yesterday where the only failure was to do with libcxxtest or a similar name.
…-------- Original message --------
From: Xiang Xiao ***@***.***>
Date: 21/9/23 13:32 (GMT+10:00)
To: apache/nuttx-apps ***@***.***>
Cc: Neale Ferguson ***@***.***>, Mention ***@***.***>
Subject: Re: [apache/nuttx-apps] Add loading of ET_DYN shared object test to sotest (PR #2026)
@nealef<https://github.com/nealef> please fix the build error reported by ci.
—
Reply to this email directly, view it on GitHub<#2026 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACLN6QGBQ2G56Q7LO442N3X3OYKXANCNFSM6AAAAAA4JVY5HA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
But the link error is directly related to this patch:
|
How can I tell what's in the
and in my branch of
Which had solved the earlier problem of (1) the no _start symbol and (2) the mismatch between architectures. Is there a way of seeing the code this latest failure was built from to see if I've missed a commit or regressed something? |
you can reproduce the problem by |
I rebased my repo and it reported:
I then remade nuttx after configuring for sim:sotest32 and get:
|
do you fetch both git(nuttx and apps) and rebase to the last master? A recent change move minmea from apps/gpsutils/ to nuttx/libc/minmea: |
Brought my
In any event it got past my dynload build:
|
Is the current |
Yes, it fix by apache/nuttx#8244, let me retrigger the ci. |
Latest failure is in |
@Donny9 @xiaoxiang781216 what do you think? Since SHMODULEFLAGS is defined to sim "board" I think it also will be needed for other arch's boards. |
Yes, or even better to move to Toolchain.defs, so it could be shared between boards |
sim doesn't have |
* examples/sotest/lib/Makefile - Add dynload directory to build * examples/sotest/lib/dynload/Makefile - Build the dynload shared object test - Use SHMODULEFLAGS and not SHLDFLAGS * examples/sotest/lib/dynload/dynload.c - Test case for loading of ET_DYN shared objects * examples/sotest/lib/dynload/.gitignore - Exclude built object from git * examples/sotest/sotest_main.c - Load and invoke the dynload test
@nealef any idea why the CI is failing in the CI ?
It could spend about 1h depending on your machine speed |
The various
|
@acassis this pr doesn't pass ci why do you merge it? |
Seems like the issue was not related, let me double check |
@acassis @xiaoxiang781216 could this merge be reverted? It breaks xtensa build on upstream CI and also breaks our internal CI. |
@almir-okato instead reverting the PR we could fix xtensa: The arch/xtensa/src/esp32s3/esp32s3_start.c has an entry point __start that calls __esp32s3_start it also has code such as:
|
@almir-okato could you please confirm it worked for you, then I will submit it. |
@acassis the entry point |
@almir-okato yes, but I noticed other chips has this same What are the issues on ESP32-S2? Are they also same __start? |
@almir-okato renaming __esp32s3_start to __start could fix the issue |
@acassis , this issue is not related directly to ESP32-S2 or ESP32-S3, neither with xtensa-only devices. Please check this comment: there is still pending work. While this is incomplete, The error message is (for RISC-V, for instance):
There is no relation to |
Thank you @tmedicci and @almir-okato ! I was thinking the issue are happening because esp32s3 was using a different __start name |
The |
It's not the entry point that's causing the grief as the I don't understand enough about the differences between various xtensa boards to determine whether it is significant that for esp32 and esp32s2 the user_space ld file has definitions for
The s3 version of this file looks radically different. |
@nealef ESP32 has a libc and other features inside their internal ROM that applications could reuse, it helps to reduce the application size, since the application don't need to be linked with an external libc to work for example (although on NuttX was have the possibility to use our libc instead). Since |
@tiagojbalmeida @almir-okato I discovered that providing the _start symbol at ROM ldscript fixes the issue. Please note that definition exists for ESP32 and ESP32S2, but is missing for ESP32S3. I used the same definition from ESP32S2 (probably needs to be a different location)
|
The Alan, adding the
@nealef, both xtensa and RISC-V already define the entrypoint in arch/xtensa/src/Makefile and nuttx/arch/risc-v/src/Makefile and it is defined as |
@tmedicci I agree, we need to discover why this symbol is generated and evaluated for Xtensa and RISC-V and doesn't happen to ARM. Probably because all ARM chips define _start at their arch xxx_start.c. Yes, the _start for ESP32-S3 is wrong, I only defined it equal ESP32-S2 to confirm that it was enough to make the linker happy. We need to understand the root causes. |
@tmedicci The script |
@tmedicci When I build the dyntest
Here's where we set it for riscv:
|
@tmedicci - @acassis tested with this patch and it worked:
|
examples/sotest/lib/Makefile
examples/sotest/lib/dynload/Makefile
examples/sotest/lib/dynload/dynload.c
examples/sotest/lib/dynload/.gitignore
examples/sotest/sotest_main.c
Summary
Support of ET_DYN shared objects was added to NuttX, this PR adds a test.
Impact
New test
dynload
is built.Testing
Run
sotest
and thedynload
shared object will be loaded, a symbol located and invoked, and the module unloaded.