-
Notifications
You must be signed in to change notification settings - Fork 39
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
Upload issue SparkFun Edge #21
Comments
Follow these instructions to install the faster/better variable bootloader. Explanation: Edges came pre-programmed with the Ambiq secure bootloader. The SparkFun Arduino core defaults to the SparkFun Variable Bootloader (SVL). We recommend upgrading to the SVL or you can select the Ambiq Secure bootloader and try again. |
One more comment... The pre-order version of the Edge board should expect to be boot-loaded at 921600 baud (we chose this for decreased bootload time), however in the Arduino core the Ambiq Secure Bootloader (SBL) is currently fixed at 115200 baud (which helps for sure-fire compatibility across operating systems because of the USB-serial driver discrepancies). So right now simply selecting 'Ambiq Secure Bootloader' won't work out of the box. There are at least two possible fixes:
@metanav Do you have a preference between these two options? @nseidle how about you? We can work this into the next release of the core. @metanav As a temporary workaround... you can edit 'platform.txt' in your installation to use 921600 baud for the SBL. Change: to tools.ambiq_bin2board.args.macosx=--bin "{build.path}/{build.project_name}.bin" --load-address-blob 0x20000 --magic-num 0xCB -o {build.path}/{build.project_name} --version 0x0 --load-address-wired 0xC000 -i 6 --options 0x1 -b 921600 -port "{serial.port}" -r 2 {upload.verbose} |
FYI re-opened as a reminder to fix this for the next release |
Thanks @nseidle and @oclyke! It is working now after the changes suggested above. But I had to do few things to make it work. In the directory /Arduino15/packages/SparkFun/hardware/apollo3/1.0.1/tools/ambiq/macosx/ambiq_bin2board: While uploading it was complaining about missing modules am_defines and keys_info. For the workaround I created symlinks as follows:
In the am_defines.py, comment out following imports (I tried to install using pip but still not loading so I commented out):
Also, I had to change this in platform.txt: to:
And set execute permission:
I hope these issues will be fixed in the next release. |
Thanks @metanav, I will use your notes to improve this soon! |
@metanav I've just released v1.0.2 to address upload concerns. I fixed the paths, and generated the binaries with "pyinstaller --onefile" to avoid making those symbolic links. On Mac and Linux I also added executable permissions, however I don't know enough to be sure that those changes will be respected when the core is installed by Arduino. For the Edge board I added the ability to choose the baud rate for the Ambiq Secure Bootloader, as well as the advanced option to enable the SparkFun Variable Loader. Will you please try out the new version and let me know how it goes? Thank you. |
Thanks @oclyke, It works! Though it is still needed to set executable permission.
The Ambiq bootloader still works. |
Okay glad that there is some progress! Seems like there are two remaining items:
Update This should be solved now. Use the boards manager to remove your current 1.0.2 installation and then re-install it. The JSON Boards Manager file is updated to use the ".tar.gz" archive instead of the ".zip" archive that was used before. This should preserve the executable file permission.
|
We've looked into the "No Announcement" error more and discovered discrepancies between Windows and MacOSX in the Python script timing and control line handling. The bootloader is sensitive to these differences and needs to be fixed. This is no longer just an Edge upload issue, so we can continue the discussion here: |
@oclyke After latest changes it is still not uploading:
Update: I was press/holding Button 14 and press/release Reset button while uploading the code as mentioned above and it did not work. But when I just uploaded without touching either buttons, it uploaded successfully! Actually that's great! Is it documented anywhere? Anyway good job! PS: Although not an issue but even after successful upload the last line is: |
@metanav Fantastic to hear! We will soon add documentation -- clearly you knew to upload the new SVL bootloader sketch with the Ambiq SBL and then switch bootloaders to SVL but we will want others to have an easier time. We will work on making 'burn bootloader' perform that same job. The point about Button14 is a good one - SVL relies on the board not going into the Ambiq SBL, which is activated on reset if the button is held down. All future Artemis boards by SparkFun will not include Button14, but I will try to find a good place to make mention of that fact for others. |
Sometimes USB cable can be an issue. Give it a try with another better USB cable. |
I was following the upload instructions mentioned on Sparkfun website, which are not accurate. I was releasing button 14 before the upload was completed, which caused this issue: |
Subject of the issue
I am not able to upload code to SparkFun Edge using Arduino IDE. It always keeps waiting at "sending hello". It seems the bootloader is not responding.
Your workbench
MacOS Mojave
I am using pre-oder SparkFun Edge directly from SparkFun.
Using SparkFun Serial Basic Breakout - CH340C and USB-C
Using Ambiq SDK toolchain there is no such issue.
The text was updated successfully, but these errors were encountered: