summaryrefslogtreecommitdiff
path: root/docs/esp32
diff options
context:
space:
mode:
authorVolodymyr Shymanskyy <vshymanskyi@gmail.com>2024-09-12 14:39:59 +0300
committerDamien George <damien@micropython.org>2025-03-17 13:03:27 +1100
commit51976110e2da32b7a5b7035b7d5f17ab49bbd40e (patch)
tree36b93e317be28fcc4dfd71e062c5494c9a7d7d20 /docs/esp32
parentf187c77da8b0ff51927b62cd1f4efd78c03bdb7f (diff)
tools/mpy_ld.py: Allow linking static libraries.
This commit introduces an additional symbol resolution mechanism to the natmod linking process. This allows the build scripts to look for required symbols into selected libraries that are provided by the compiler installation (libgcc and libm at the moment). For example, using soft-float code in natmods, whilst technically possible, was not an easy process and required some additional work to pull it off. With this addition all the manual (and error-prone) operations have been automated and folded into `tools/mpy_ld.py`. Both newlib and picolibc toolchains are supported, albeit the latter may require a bit of extra configuration depending on the environment the build process runs on. Picolibc's soft-float functions aren't in libm - in fact the shipped libm is nothing but a stub - but they are inside libc. This is usually not a problem as these changes cater for that configuration quirk, but on certain compilers the include paths used to find libraries in may not be updated to take Picolibc's library directory into account. The bare metal RISC-V compiler shipped with the CI OS image (GCC 10.2.0 on Ubuntu 22.04LTS) happens to exhibit this very problem. To work around that for CI builds, the Picolibc libraries' path is hardcoded in the Makefile directives used by the linker, but this can be changed by setting the PICOLIBC_ROOT environment library when building natmods. Signed-off-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com> Co-authored-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'docs/esp32')
0 files changed, 0 insertions, 0 deletions