Re: Having trouble with code upload... XCode
Posted by
sbt on
Dec 27, 2016; 9:07pm
URL: http://bluesaab-forum.90.s1.nabble.com/Having-trouble-with-code-upload-XCode-tp879p885.html
saabstutz wrote
I tried that in XCode and unfortunately the issue doesn't seem to have disappeared. I'm working my way through the code and see that it's linking to the file ArduinoUno.xcconfig for the current board tag. Also, if I remove the line that's throwing the board tag error, I get another error: "/lib/version.txt: No such file or directory" It's also giving me a warning about embedXCode not being tested with XCode version 8, so maybe that's the real issue here.
So you found the release configuration was unset, and you set it?
I'm not surprised removing the lines with errors isn't working, however the warning is odd; I'm not seeing this warning with Xcode 8.2.1, and embedXcode 5.4.2, and in any case, it is working for me and you can probably ignore this warning. Did you revert all the other changes you'd made while trying to get this working? I'd suggest a clean pull from Github.
saabstutz wrote
Read up on library building and tried that - it compiled and uploaded through the Arduino IDE but the module doesn't work anymore - I'm getting serial output telling me it's updated and it will interface with the car, but doesn't seem like the RN52 is responding to it. No flashing BT1/BT2 lights.
OK, it sounds like you have two separate issues here. I did see an issue that sounds like these symptoms (no BT lights blinking) with the released version 4 after I added the Amp shield (to version 5 hardware). I made a PR that's now in the master repo that fixed it for me, as well as ensuring the BT module is programmed correctly. You could try uploading the current master instead of 4.0 release. The Arduino IDE can work with a copy of the repo without worrying about library installations. Just switch to the current master branch in your copy of SAAB-CDC after a git fetch, open the SAAB-CDC.ino file and upload from there.
saabstutz wrote
When I update does the RN52 need to be reprogrammed?
No; uploading new firmware to the ATMega328P will not change the RN52 settings. If your module was working before, it should be OK. If you've done a factory reset though (using the jumper I think that is on your hardware version) you would need to reapply the settings manually. Sadly, the autoconfigure fix I provided hasn't been backported to hardware versions earlier than 5, although it should work on all v4.x boards since GPIO7 is grounded which avoids serial port speed issues. If the latest firmware doesn't fix your problem, load up the RN52-BT-PRG sketch and post back the results of the "D" command. It will be a list of settings in the module. I'd be surprised if an unconfigured or reset RN52 is your problem; it will normally blink the LEDs even when set to factory defaults.
saabstutz wrote
I'm using XCode for other projects, so I already had it on my machine - I figured why not use it.
Sure; I can see that. It's another variable to eliminate when trying to troubleshoot. I'm sorry I didn't appreciate the significance of this comment in your first post:
saabstutz wrote
I tried building the libraries myself, but after uploading that code I seem to have ruined the functionality for right now. Power LED on but none of the others are.
As above, if you're seeing the same issue I found with SAAB-CDC v4.0 release, try the latest master via git. If that doesn't work, let's see the RN52 check I suggested above.
Cheers,
Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods