-
Notifications
You must be signed in to change notification settings - Fork 125
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
nRF82840DK variant.h and .cpp broken #64
Conversation
Bump version to 4.0.0
This corrects the prior SVD that pointed to nrf52.svd, which is defined for the nrf52832 chipset, which has different peripherals, register bases, ...
Add proper SVD for nrf52840 (differs from nrf52832)
I lost too many hours yesterday on this issue. Using platformio.ini [env:nrf52840_dk]
platform = nordicnrf52
board = nrf52840_dk
framework = arduino the verbose build output is
note that the wrong variant file is used
because of the wrong define #if (PIN_LED1) != 2
/* Wrong file! .platformio/packages/framework-arduinonordicnrf5/variants/nRF52DK/variant.cpp */
#undef PIN_LED1
#undef PIN_LED2
#undef PIN_LED3
#undef PIN_LED4
#undef PIN_BUTTON1
#undef PIN_BUTTON2
#undef PIN_BUTTON3
#undef PIN_BUTTON4
#define PIN_LED1 2 /*< P0.13 */
#define PIN_LED2 3 /*< P0.14 */
#define PIN_LED3 4 /*< P0.15 */
#define PIN_LED4 5 /*< P0.16 */
#define PIN_BUTTON1 0 /*< P0.11 */
#define PIN_BUTTON2 1 /*< P0.12 */
#define PIN_BUTTON3 12 /*< P0.24 */
#define PIN_BUTTON4 13 /*< P0.25 */
#endif After spending too much time debugging this was the last thing I suspected. |
The problem here is that we are not responsible for implementing new variants. This boards doesn't even support |
So how can we contribute / implement it - proper PR to |
It'd be perfect if you could submit a PR to this repository, then we can update the package for this core. |
The final firmware binary for nrfutil should be wrapped as dfu package despite missing bootloader binary inside framework package.
I am doing a project with the nRF52840DK and when I compile a basic blink.cpp the Arduino pin numbers do not match the pinout on the dev board, also many of the pins where not broken out in software. So I created a new /.platformio/platforms/nordicnrf52/boards/nrf52840.json with the only change being
"variant": "nrf52840DK" on line 9
and then created a new variant folder for the nrf52840DK in .platformio/packages/framework-arduinonordicnrf5/variants and now it works for the dev board.
Framework bug.zip
Basically I used the variant folder from the Adafruit BSP version and cut and pasted it.