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

Build issue #52

Closed
thibww67 opened this issue Aug 11, 2020 · 12 comments
Closed

Build issue #52

thibww67 opened this issue Aug 11, 2020 · 12 comments

Comments

@thibww67
Copy link

thibww67 commented Aug 11, 2020

I managed to create my MakeFile but after that when I want to "make" it, I get these errors at 35% :

arm-none-eabi-gcc: error: BOARD_PCA10040: No such file or directory
arm-none-eabi-gcc: error: CONFIG_GPIO_AS_PINRESET: No such file or directory
arm-none-eabi-gcc: error: DEBUG: No such file or directory
arm-none-eabi-gcc: error: DEBUG_NRF_USER: No such file or directory
arm-none-eabi-gcc: error: FREERTOS: No such file or directory
arm-none-eabi-gcc: error: NIMBLE_CFG_CONTROLLER: No such file or directory
arm-none-eabi-gcc: error: NRF52: No such file or directory
arm-none-eabi-gcc: error: NRF52832: No such file or directory
arm-none-eabi-gcc: error: NRF52832_XXAA: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_12: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_15: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_20: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_31: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_36: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_51: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_54: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_55: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_58: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_64: No such file or directory
arm-none-eabi-gcc: error: NRF52_PAN_74: No such file or directory
arm-none-eabi-gcc: error: OS_CPUTIME_FREQ: No such file or directory
arm-none-eabi-gcc: error: __HEAP_SIZE=8192: No such file or directory
arm-none-eabi-gcc: error: __STACK_SIZE=8192: No such file or directory
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'
arm-none-eabi-gcc: error: unrecognized command line option '--defsym'

Do you have any solutions ?

Thank you !

@thibww67 thibww67 reopened this Aug 11, 2020
@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

Hi: Building the firmware on Windows may be tricky... Would you like to try building in the GitHub Cloud with GitHub Actions? Here are the steps...

https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud

@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

Oh sorry if you browse the article a little more you'll see this fix, please try this...

If we see this error...

/home/runner/work/Pinetime/Pinetime/src/drivers/TwiMaster.cpp:1:10: fatal error: sdk/integration/nrfx/nrfx_log.h: No such file or directory
 #include <sdk/integration/nrfx/nrfx_log.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [src/CMakeFiles/pinetime-app.dir/drivers/TwiMaster.cpp.o] Error 1

Browse to...

https://github.com/ACCOUNT_NAME/Pinetime/blob/master/src/drivers/TwiMaster.cpp

(Change ACCOUNT_NAME to our GitHub Account Name)

Edit the first two lines...

#include <sdk/integration/nrfx/nrfx_log.h>
#include <sdk/modules/nrfx/hal/nrf_gpio.h>

To...

#include <nrfx_log.h>
#include <nrf_gpio.h>

Click Commit Changes to save the file.

This triggers a new Firmware Build, which should succeed now.

@thibww67
Copy link
Author

Thank you for your answers !

Yes I noticed this just after I wrote my comment, it works and I managed to download the ZIP file.
The last problem is that Nrf Connect seems to have change a little bit and I can't find the way to download the zip with the DFU. on Android.

Screenshot_20200811-131737_nRF Connect

@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

Cool great! I think you need to flash the wired way the first time, after that nRF Connect will work.

Look in the "Other Options" section questions 4 and 5...

https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud#other-options

Do you have a Raspberry Pi? We will need to unprotect the Flash ROM with pinetime-updater as explained here...

https://github.com/lupyuen/pinetime-updater/blob/master/README.md#remove-flash-rom-protection

Then we can use pinetime-updater to flash the file pinetime-app.out (note that it's not the same as the other ZIP file)...

  1. Download the artifact pinetime-app.out from GitHub Actions.

  2. We'll get a ZIP file. Extract the PineTime Firmware Image inside: pinetime-app.out

  3. Flash with PineTime Updater...

    • Run ./run.sh. Select Latest Bootloader to flash the latest bootloader

    • Then run ./run.sh again. Select Downloaded File and pinetime-app.out

    • Flash to address 0x0

@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

If you're still stuck, come chat with us on the PineTime Chatroom on Discord / Matrix / Telegram / IRC: https://wiki.pine64.org/index.php/PineTime#Community

@thibww67
Copy link
Author

Yes I still stuck because I have no Raspberry available right now..
I just managed to launch the Cmake command with OpenOCD but it changes nothing.
I posted a thread on Pine64.
Thank you for your time !

@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

Sure no problem :-) I'm sorry that you had to get the first batch of PineTime watches, the upcoming batch will have built-in wireless flashing support.

Now that you have figured out how to build the firmware in the cloud, maybe you could experiment with Clock.cpp and make your own watch face :-)

https://lupyuen.github.io/pinetime-rust-mynewt/articles/pinetime#programming-with-pinetime

@thibww67
Copy link
Author

The project is very interesting but unfortunately I can not yet build the code on my Windows, and even if I build it, I don't really know if it is possible to flash it over USB.

But thank you for all your answers !

@lupyuen
Copy link
Collaborator

lupyuen commented Aug 11, 2020

Sure I understand. We have a newcomer who developed their own Watch Face without a PineTime, by simply editing Clock.cpp and building with GitHub Actions.

We'll have a tutorial on that soon (written by our newcomer). Check with me on Twitter or Mastodon for updates :-)

https://twitter.com/MisterTechBlog

https://qoto.org/@lupyuen

@borgmanJeremy
Copy link

@thibww67 I have not tried it myself, but I think you should be able to build it on windows using windows subsystem for linux (WSL).

@JF002
Copy link
Collaborator

JF002 commented Aug 11, 2020

I did not try to compile this project on windows, but this would be a nice addition. PR welcome :)

The documentation about NRFConnect is valid only if you've already programmed this project on your Pinetime. The stock firmware does not work that way.

You'll need a SWD debugger to program the firmware into your pinetime. And, as the Pinetime comes with the memory protected, you need a debugger than is able to unlock it (jlink, raspberrypi,...).
The memory won't be locked in the next batch, but it's not available yet...

@JF002
Copy link
Collaborator

JF002 commented Sep 20, 2020

I'm closing this issue as there's no activity for more than a month. @thibww67 reopen it if necessary.

@JF002 JF002 closed this as completed Sep 20, 2020
tgc-dk pushed a commit to tgc-dk/InfiniTime that referenced this issue Nov 28, 2023
Add helper to modify spi raw file, to make experimenting with it easier.

```sh
$ ./littlefs-do --help
Usage: ./littlefs-do <command> [options]
Commands:
  -h, --help           show this help message for the selected command and exit
  -v, --verbose        print status messages to the console
  stat                 show information of specified file or directory
  ls                   list available files in 'spiNorFlash.raw' file
  mkdir                create directory
  rmdir                remove directory
  rm                   remove directory or file
  cp                   copy files into or out of flash file
  settings             list settings from 'settings.h'
```

In the process restructure the CMake file for less duplicate
includes/defines for both executables (`infinisim` and `littlefs-do`).

Upload the `littlefs-do` binary built by the CI additionally to the `infinisim` binary.
Use the updated upload-artifact@v3 template to do that.
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

4 participants