-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support flashing OpenMote via serial interface with 'make flash' #4460
Conversation
Note that PR #4433 should also be considered with this PR, since otherwise flashing an image via this method will probably lock the user out of the bootloader, and JTAG flashing will be their only option. |
c56cb33
to
5438c56
Compare
gave this a quick try, but did not succeed. I did merge this PR ans well as #4433 on top of master. Then I merged in also #4937 (as my JLink adapter was having trouble with the existing Jlink scripts...). Then I did flash using JTAG once successfully, but afterwards I was still not able to flash using bsl... Any ideas? |
@haukepetersen did you boot the MCU into the bootloader before trying to flash with bsl? With these patches, this is done by connecting the ON/SLEEP and GND pins and power-cycling the board. When the onboard bootloader is booted (rather than whatever is in flash), all 4 leds on the OpenMote should glow faintly together, and the bsl script should Just Work. If you already did this, what was the error you got? |
no, this I did not do... I will give it another try |
Rebased to master after inclusion of #4937. A few notes, since it's been a while since I played around with this and things have changed since then:
|
Can you rebase this since #4433 was merged? this way I can test this too |
Rebased. Thanks @kYc0o |
I tested this and I can confirm that it works but actually, as @aeneby says we need to generate this .bin file. |
Ok it's working now, but it's quite slow... any reason to keep the baudrate at 115200? |
Enable directly from Makefile target 'flash' using cc2538-bsl script, and make this the default flashing method for this platform.
Well spotted. No, there's no reason it needs to be 115200. According to the documentation, the cc2538 supports up to 460800 baud, which may be doubled using an external clock. Looking at the script, it should actually negotiate this double-speed automatically if you don't specify a baud rate, but for me doing this fails:
So I've updated the baud rate to 460800. |
Humm... it's strange but the flashing time is still the same even at a high baudrate. I wonder why the cc2538dk using the same script and almost the same parameters can flash much faster. |
Let's flash them all! Go! |
Support flashing OpenMote via serial interface with 'make flash'
Thanks @kYc0o :) For the record though, I did notice an increase in speed with the changed baud rate. From ~70s to ~30s for the flashing process. Strange that you didn't see the same result. |
Support flashing openmote-cc2538 board via cc2538-bsl script directly from Makefile target 'flash', and make this the default flashing method for this platform.
Fixes issue #4434.
TODO: Update wiki, which currently suggests that only JTAG flashing is supported.