Giter VIP home page Giter VIP logo

Comments (4)

fred-corp avatar fred-corp commented on September 13, 2024 1

@mikaelnousiainen

libbed-devel error

This is the error I get :

[ 78%] Linking CXX executable RS41ng.elf
/usr/local/Cellar/gcc-arm-none-eabi/20200630/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol arch_paths_first; defaulting to 0000000008000000
Building /Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/build/RS41ng.hex 
Building /Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/build/RS41ng.bin
   text    data     bss     dec     hex filename
  51004    1520    5160   57684    e154 RS41ng.elf
[ 78%] Built target RS41ng.elf
Scanning dependencies of target Project
[ 79%] Building C object tests/CMakeFiles/Project.dir/bell_test.c.o
/Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/tests/bell_test.c:16:54: warning: data argument not used by format string [-Wformat-extra-args]
    snprintf(test, sizeof(test), "%3$s %4$s %2$s\n", "1fd", gg, "3aa", "4ab");
                                 ~~~~~~~~~~~~~~~~~~  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
/Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/tests/bell_test.c:27:13: warning: data argument not used by format string [-Wformat-extra-args]
            telemetry.locator,
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
/Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/tests/bell_test.c:74:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
3 warnings generated.
[ 80%] Building C object tests/CMakeFiles/Project.dir/morse_test.c.o
/Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/tests/morse_test.c:28:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
1 warning generated.
[ 81%] Building C object tests/CMakeFiles/Project.dir/template_test.c.o
/Users/fredericdruppel/Documents/Projects/2022-08-01_RS41_Geiger/RS41ng/tests/template_test.c:3:10: fatal error: 'bsd/string.h' file not found
#include <bsd/string.h>
         ^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [tests/CMakeFiles/Project.dir/template_test.c.o] Error 1
make[1]: *** [tests/CMakeFiles/Project.dir/all] Error 2
make: *** [all] Error 2

the .elf file gets made, but I'm missing bsd/string.h which I figured is part of libbsd-devel.

Docker build environment

I just changed the following lines in docker_build.sh from this :

# Copy the binary, ELF and hex to the home directory
cp src/RS41ng.elf /usr/src/rs41ng
cp RS41ng.hex /usr/src/rs41ng
cp RS41ng.bin /usr/src/rs41ng

to this :

# Copy the binary, ELF and hex to the home directory
rm -rf /usr/src/rs41ng/build/
mkdir /usr/src/rs41ng/build/
cp src/RS41ng.elf /usr/src/rs41ng/build/
cp RS41ng.hex /usr/src/rs41ng/build/
cp RS41ng.bin /usr/src/rs41ng/build/

So the container automatically replaces the old build files with new ones in a build directory.

Then I just ran the following commands to create the container and build the code (as mentioned in @MrARM 's README) :

docker build -t rs41ng_compiler .
docker run --rm -it -v $(pwd):/usr/src/rs41ng rs41ng_compiler

Finally, I can flash the .elf with openOCD :

openocd -f ./openocd_rs41.cfg -c "program build/RS41ng.elf verify reset exit"

And it works a treat !

from rs41ng.

fred-corp avatar fred-corp commented on September 13, 2024

Some progress :
I installed the toolchain with HomeBrew instead of MacPorts (it is now in /usr/local/bin).
Now the error message shows something else :

[ 78%] Linking CXX executable RS41ng.elf
arm-none-eabi-g++: error: RS41: No such file or directory
arm-none-eabi-g++: error: RS41ng/build/RS41ng.map: No such file or directory
make[2]: *** [src/RS41ng.elf] Error 1
make[1]: *** [src/CMakeFiles/RS41ng.elf.dir/all] Error 2
make: *** [all] Error 2

There seems to be a file missing, I'll try to investigate on that

from rs41ng.

fred-corp avatar fred-corp commented on September 13, 2024

Issue fixed, I had spaces in the folder name...

The build still gives out errors before setting to 100%, apparently I need libbsd-devel, which I could not install on my machine...

I built the program with the Dockerfile @MrARM made (linked to this pull request), and it works great !

from rs41ng.

mikaelnousiainen avatar mikaelnousiainen commented on September 13, 2024

@fred-corp Ok, thanks for the report -- unfortunately I don't have a Mac to test the build.

Did the Dockerfile and its environment work for you or did you need to do some changes to it? What was the comment about libbsd-devel?

from rs41ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.