0

Compilation issues with Feather nRF52
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Compilation issues with Feather nRF52

by kllassen on Sun Dec 31, 2017 3:50 pm

I'm following the "Bluefruit nRF52 Feather Learning Guide" and can't get the Blink example to compile. I keep getting fatal errors for missing .H files. I have manually copied many of them to the path called out in the error, but some I can't be found on the computer. I have installed Arduino 1.8.5 (latest) on Windows 10 and have followed the instructions (skipped step #2, third party tools as I'm using windows).

Do I have a file structure issue? Is there a best practice for files and sketch locations?

I have used Arduino IDE successfully on this computer with other hardware and didn't have these issues.

Files causing fatal crashes so far...
stdint.H - copied, fixed
stdlib.H - copied, fixed
malloc.H - copied from Github, fixed
features.H - can't find on computer... time to seek help:)

Thanks for the help!

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Mon Jan 01, 2018 2:53 am

What code are you trying to compile? I don't know of any standard header named 'features.h'

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compilation issues with Feather nRF52

by kllassen on Mon Jan 01, 2018 1:07 pm

I'm trying to compile the "blink" test code just to establish a working toolchain. Here is the code I'm trying to use...

https://www.arduino.cc/en/Tutorial/Blin ... lock&num=1

/*
Blink

Turns an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products

modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Tue Jan 02, 2018 3:21 am

I just compiled that for an nRF52 without any problems.

Try deleting your Arduino15 folder and reinstalling the nRF52 board support package from scratch. Errors like that often trace back to old files that should have been deleted during a version upgrade, but weren't.

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compilation issues with Feather nRF52

by kllassen on Wed Jan 03, 2018 11:21 pm

It Worked! I can now compile and upload the test code.

One possible issue, I can't send new code while the GPS Feather Wing is mounted. I need to dismount the GPS Wing to program. Do you expect this?

PS. I'm using the Feather Double to mound the Feather Board and GPS Wing.

Thanks.

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Thu Jan 04, 2018 6:01 am

That's a hardware limitation.

The nRF52 uses an external USB-to-Serial converter to talk to the computer, just like the Arduino Uno. The TX/RX pins are connected to the Serial side of the converter, so you can't talk to the computer and another Serial device at the same time.

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compilation issues with Feather nRF52

by kllassen on Thu Jan 04, 2018 7:51 am

Thanks. So the GPS wing is compatible with nRF52, I just can't use USB (program, serial monitor, download GPS logged data, etc) while the wing is attached.

Can I move the GPS to different pins to resolve? Will I be able to perform the USB functions listed above via Bluetooth?

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Fri Jan 05, 2018 3:50 am

kllassen wrote:Thanks. So the GPS wing is compatible with nRF52, I just can't use USB (program, serial monitor, download GPS logged data, etc) while the wing is attached.

That's correct.

kllassen wrote:Can I move the GPS to different pins to resolve?

That will work. The GPS FeatherWing has solder jumpers on the underside that you can cut to disconnect the signals from the Feather's TX/RX pins, and a set of TX/RX holes at the end that you can connect to other GPIO pins.

The nRF52's SoftwareSerial library should be able to make a connection on any pair of GPIO pins you choose.

kllassen wrote:Will I be able to perform the USB functions listed above via Bluetooth?

No. BLE and Bluetooth different and incompatible protocols that happen to be managed by the same working group, and the working group seems to love to come up with confusingly-similar names.

The BLE interface can't upload firmware or make a connection to the Arduino IDE's Serial Monitor.

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compilation issues with Feather nRF52

by kllassen on Sat Jan 06, 2018 12:15 pm

Can you recommend another pin set for TX/RX? I am also using a FeatherWing OLED 128x32 stacked on the FeatherBoard. I don't know what pins will create a conflict.

Can you recommend any "Example" or sample code I can try to using SoftwareSerial and GPS parsing?


Thanks again for all the help.

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Sun Jan 07, 2018 3:18 am

The OLED FeatherWing uses the SDA and SCL pins, so any of the other GPIO pins between those and the USB pin will be free.

There's really nothing beyond that to put in a tutorial. The relevant line of code is:

Code: Select all | TOGGLE FULL SIZE
SoftwareSerial mySerial( RXpin, TXpin );

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compilation issues with Feather nRF52

by kllassen on Sun Jan 21, 2018 1:20 pm

I have cut the TX/RX connections on the GPS Feather and jumped the GPS TX to Pin 7 and GPS RX to Pin 11. I am now trying to run a basic RX-TX test to see the GPS messages. I'm trying to modify the sample code from the tutorial here... https://learn.adafruit.com/adafruit-ult ... rx-tx-test

I tried to add "SoftwareSerial mySerial(7, 11);" to the setup, but I get errors. Can you help me understand how to communicate to the GPS Feather now it's RX/TX pins are moved?

Thanks.

Actual Code from tutorial...
// test a passthru between USB and hardware serial

void setup() {
Serial.println("GPS echo test");
Serial.begin(9600);
Serial1.begin(9600); // default NMEA GPS baud
}


void loop() {
if (Serial.available()) {
char c = Serial.read();
Serial1.write(c);
}
if (Serial1.available()) {
char c = Serial1.read();
Serial.write(c);
}
}

kllassen
 
Posts: 10
Joined: Fri Oct 07, 2016 10:27 pm

Re: Compilation issues with Feather nRF52

by adafruit_support_mike on Fri Jan 26, 2018 4:59 am

What error messages are you getting?

adafruit_support_mike
 
Posts: 47746
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.