Skip to content
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

How to compile firmware? #1

Open
mrninhvn opened this issue Jun 7, 2021 · 7 comments
Open

How to compile firmware? #1

mrninhvn opened this issue Jun 7, 2021 · 7 comments

Comments

@mrninhvn
Copy link

mrninhvn commented Jun 7, 2021

I have limited experience with nrf52-sdk, i still don't understand how to compile the firmware, can you give more instructions?
Thank you!

@mgottschlag
Copy link
Collaborator

Sorry, I forgot to update the README.md when I exchanged the old NRF SDK with the NRF Connect SDK. See commit 54d23b0 for the new instructions.

To install the NRF Connect SDK, follow https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html - fetching the master branch of nrfconnect/sdk-nrf should work - if not, I am currently on nrfconnect/sdk-nrf@5a8085cd.

@mrninhvn
Copy link
Author

mrninhvn commented Jun 7, 2021

I got that error when building:
-- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=c:\python39\python.exe' '-BD:\Keyboard\goboard\firmware\main\build' '-SD:\Keyboard\goboard\firmware\main' -GNinja

And i want to test unifying, how can i switch to unifying mode, thank you.

@mrninhvn
Copy link
Author

mrninhvn commented Jun 8, 2021

@mgottschlag Hi, i'm return ncs v1.5.1 then config file ok, but build got error
[92/241] Building CXX object CMakeFiles/app.dir/src/bluetooth.cpp.obj FAILED: CMakeFiles/app.dir/src/bluetooth.cpp.obj

In file included from ../src/bluetooth.hpp:4, from ../src/bluetooth.cpp:1: ../src/mode_switch.hpp:55:26: error: field 'callback' has incomplete type 'k_work_delayable' 55 | struct k_work_delayable callback; | ^~~~~~~~ ../src/mode_switch.hpp:55:9: note: forward declaration of 'struct k_work_delayable' 55 | struct k_work_delayable callback; | ^~~~~~~~~~~~~~~~

@mgottschlag
Copy link
Collaborator

Oh, I completely forgot this issue.

  1. Unifying code is only working in the old pre-nrf-connect-sdk firmware, i.e. 59bb7e6. This version requires the regular nrf-sdk and does not use Zephyr. In this case, the old README.md contains the correct instructions to compile the firmware.
  2. The error you are seeing is because you do not use the correct version of NCS. You need one with a sufficiently new Zephyr, because the code needs the new work queue API.

@mrninhvn
Copy link
Author

@mgottschlag Finally compiled the firmware, I'm working with this tree https://github.com/BerndGottschlag/goboard/tree/59bb7e6475d9e5f007e6ed9bba5a2c76e7c1f737
I don't understand how the main.c program works, can you explain it to me? Thank you.

@mrninhvn
Copy link
Author

@mgottschlag So unifying code doesn't work with Zephyr, right?

@mrninhvn
Copy link
Author

mrninhvn commented Aug 28, 2021

Oh, I completely forgot this issue.

  1. Unifying code is only working in the old pre-nrf-connect-sdk firmware, i.e. 59bb7e6. This version requires the regular nrf-sdk and does not use Zephyr. In this case, the old README.md contains the correct instructions to compile the firmware.
  2. The error you are seeing is because you do not use the correct version of NCS. You need one with a sufficiently new Zephyr, because the code needs the new work queue API.

Hi, i complie 59bb7e6 and flash, but nothing work, even usb, can you help me? I using nrf5sdk 17.0.2, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants