arduino / nicla-sense-me-fw

Arduino Nicla Sense ME resources (libraries, bootloader, host pc utilities)

Repository from Github https://github.comarduino/nicla-sense-me-fwRepository from Github https://github.comarduino/nicla-sense-me-fw

[AE-60] Compiling `Blink_flasher_unisense` leads to `Error during build: exit status 1`

aliphys opened this issue Β· comments

Describe the Problem

πŸ˜” The Blink_flasher_unisense.ino sketch does not compile, due to an exit status 1 error message.

To reproduce

Compile sketch to Nicla Sense ME Board

arduino-cli compile --fqbn arduino:mbed_nicla:nicla_sense 

Output:

/home/ali/gitRepos/nicla-sense-me-fw/bootloader/examples/Blink_flasher_unisense/Blink_flasher_unisense.ino: In function 'void loop()':
/home/ali/gitRepos/nicla-sense-me-fw/bootloader/examples/Blink_flasher_unisense/Blink_flasher_unisense.ino:53:5: error: 'system_reset' was not declared in this scope
     system_reset();
     ^~~~~~~~~~~~
/home/ali/gitRepos/nicla-sense-me-fw/bootloader/examples/Blink_flasher_unisense/Blink_flasher_unisense.ino:53:5: note: suggested alternative: '_system_r'
     system_reset();
     ^~~~~~~~~~~~
     _system_r


Used platform      Version Path                                                           
arduino:mbed_nicla 4.0.2   /home/ali/.arduino15/packages/arduino/hardware/mbed_nicla/4.0.2
Error during build: exit status 1

Expected behaviour

πŸ™‚ Sketch compiles

Arduino CLI version

0.32.3 - arduino/arduino-cli@2661f5d

Operating system

Ubuntu 22.04.2 LTS

Additional Context

The system_reset() function is not identified by the compiler.


As far as I see, this is only defined for the SAMD core.
https://github.com/arduino/ArduinoCore-samd/blob/84c09b3265e2a8b548a29b141f0c9281b1baf154/bootloaders/mzero/Bootloader_D21/src/ASF/sam0/drivers/system/system.h#L441
Compiling for a SAMD board leads to

$ arduino-cli compile --fqbn arduino:samd:nano_33_iot
/home/ali/gitRepos/nicla-sense-me-fw/bootloader/examples/Blink_flasher_unisense/Blink_flasher_unisense.ino:24:10: fatal error: SPIFBlockDevice.h: No such file or directory
 #include "SPIFBlockDevice.h"
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.


Used platform Version Path                                                      
arduino:samd  1.8.13  /home/ali/.arduino15/packages/arduino/hardware/samd/1.8.13
Error during build: exit status 1

I am unable to install the SPIFBlockDevice library via command line (should this need to be installed separately).

$ arduino-cli lib install SPIFBlockDevice
Error installing SPIFBlockDevice: Library 'SPIFBlockDevice' not found