Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Bootloader burnt in Arduino IDE but not in VM (Read 4313 times)
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Bootloader burnt in Arduino IDE but not in VM
Feb 24th, 2017 at 10:53pm
Print Post  
Hello,

I am using the NRF core from https://github.com/sandeepmistry/arduino-nRF5

For boards such as the nRF52 DK, a bootloader (or "Softdevice" as they call it) can be burnt. In the Arduino IDE, when setting the "Softdevice" menu option to S132, the bootloder gets burnt by my ST-Link V2.

However in VM, the Micro Build output reads:
"This board does not support the burning of a bootloader
Burn failed".

The section of the boards.txt for the nRF52 DK is copied below, as the well as the section of platform.txt about the bootloader.
Thank you for your help!

Armel

------------- boards.txt (excerpt)
nRF52DK.name=nRF52 DK

nRF52DK.vid.0=0x1366
nRF52DK.pid.0=0x1015

nRF52DK.upload.tool=sandeepmistry:openocd
nRF52DK.upload.protocol=
nRF52DK.upload.interface=jlink
nRF52DK.upload.target=nrf52
nRF52DK.upload.maximum_size=524288
nRF52DK.upload.setup_command=transport select swd;
nRF52DK.upload.use_1200bps_touch=false
nRF52DK.upload.wait_for_upload_port=false
nRF52DK.upload.native_usb=false

nRF52DK.bootloader.tool=sandeepmistry:openocd

nRF52DK.build.mcu=cortex-m4
nRF52DK.build.f_cpu=16000000
nRF52DK.build.board=NRF52_DK
nRF52DK.build.core=nRF5
nRF52DK.build.variant=nRF52DK
nRF52DK.build.variant_system_lib=
nRF52DK.build.extra_flags=-DNRF52
nRF52DK.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
nRF52DK.build.ldscript=nrf52_xxaa.ld

nRF52DK.menu.softdevice.none=None
nRF52DK.menu.softdevice.none.softdevice=none

nRF52DK.menu.softdevice.s132=S132
nRF52DK.menu.softdevice.s132.softdevice=s132
nRF52DK.menu.softdevice.s132.softdeviceversion=2.0.1
nRF52DK.menu.softdevice.s132.upload.maximum_size=409600
nRF52DK.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
nRF52DK.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld

nRF52DK.menu.lfclk.lfxo=Crystal Oscillator
nRF52DK.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
nRF52DK.menu.lfclk.lfrc=RC Oscillator
nRF52DK.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
nRF52DK.menu.lfclk.lfsynt=Synthesized
nRF52DK.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT

------------ platform.txt (excerpt)
tools.openocd.bootloader.params.verbose=-d2
tools.openocd.bootloader.params.quiet=-d0
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -f interface/{program.interface}.cfg -c "{program.setup_command}" -f target/{upload.target}.cfg -c "program {softdevice}_{upload.target}_{softdeviceversion}_softdevice.hex}} verify reset; shutdown;"
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Bootloader burnt in Arduino IDE but not in VM
Reply #1 - Feb 24th, 2017 at 11:08pm
Print Post  
Hi,

Thanks for the info.

There is an upload verbose and compile verbose setting. it's always good to switch then on along with "show build properties" then build and email the output to info[at]visualmicro..com or attached to a post.

This shows more details and might save some time

Thanks
  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Bootloader burnt in Arduino IDE but not in VM
Reply #2 - Feb 24th, 2017 at 11:54pm
Print Post  
Compilation/upload are OK, this is just the 'Burn bootloader' operation that fails, and I couldn't get much info on that.

Anyway, I fixed the problem by specifying a fake bootloader file in boards.txt: nRF52DK.bootloader.file=0
This dummy value is not used since in platform.txt, since the filename is generated dynamically.
My guess is that bootloader.file is missing, VM assumes that there won't be anything to burn, and therefore throws the error.

This workaround will do for now.

Thanks!

Armel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Bootloader burnt in Arduino IDE but not in VM
Reply #3 - Feb 25th, 2017 at 12:41pm
Print Post  
Thanks a lot. That saves me looking at the build output. That's how older arduino versions work with bootloader file so the check needs to be expanded.

Will fix
« Last Edit: Feb 25th, 2017 at 12:42pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Bootloader burnt in Arduino IDE but not in VM
Reply #4 - Feb 25th, 2017 at 2:01pm
Print Post  
fixed in next release thanks
  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Bootloader burnt in Arduino IDE but not in VM
Reply #5 - Mar 2nd, 2017 at 10:15am
Print Post  
Cool thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint