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

Compilation error on NRF52840 #207

Open
jkano opened this issue May 13, 2020 · 1 comment · May be fixed by #208
Open

Compilation error on NRF52840 #207

jkano opened this issue May 13, 2020 · 1 comment · May be fixed by #208
Assignees
Labels
possible bug Possibly a bug. Needs verification before moving to *bug* status.

Comments

@jkano
Copy link

jkano commented May 13, 2020

Any bug report / feature request raised here MUST be submitted according to the respective templates or they will be flagged with 'Not enough information'. No action will be taken till all the prerequisite information (according to the right template) is provided. If no information is provided for over a month after the 'Not enough information' label is applied, the issue will be closed.
For support questions (for example, tutorials on how to use the library), please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.

Hi, I was testing your library on the NRF52840 Feather and I got one compilation error:

D:\Documents\Arduino\libraries\SPIMemory\src/SPIMemory.h:114:12: fatal error: util/delay.h: No such file or directory
   #include <util/delay.h>
            ^~~~~~~~~~~~~~
compilation terminated.

This is the code that is giving that error:

#ifndef ARCH_STM32
  #if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32L0) || defined(__STM32F1__) || defined(STM32F1) || defined(STM32F3) || defined(STM32F4) || defined(STM32F0xx)
    #define ARCH_STM32
  #endif
#endif
#if defined (ARDUINO_ARCH_SAM) || defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_ESP8266) || defined (SIMBLEE) || defined (ARDUINO_ARCH_ESP32) || defined (BOARD_RTL8195A) || defined(ARCH_STM32) || defined(ESP32) || defined(NRF52)
// RTL8195A included - @boseji <[email protected]> 02.03.17
  #define _delay_us(us) delayMicroseconds(us)
#else
  #include <util/delay.h>
#endif

This is because the NRF52 Core for new chips it doesn't have that NRF52 macro defined, instead it has now the macro NRF52_SERIES so basically by adding || defined(NRF52_SERIES) it will compile for all new devices.

Hope this helps anyone getting this error.


DO NOT DELETE OR EDIT anything below this

Note 1: Make sure to add all the information needed to understand the bug so that someone can help. If any essential information is missing we'll add the 'Needs more information' label and close the issue until there is enough information.

Note 2: For support questions (for example, tutorials on how to use the library), please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.


GitHub issue state GitHub issue title GitHub issue author GitHub issue label GitHub issue comments GitHub issue age GitHub issue last update

@jkano jkano added the possible bug Possibly a bug. Needs verification before moving to *bug* status. label May 13, 2020
@TheSecondEmperor
Copy link

Out of curiosity, did you use this library to read/write to an external flash chip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Possibly a bug. Needs verification before moving to *bug* status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants