Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you need to adjust the fuses, simply go to the following code in Sconscript:

 

Code Block
firstline414
linenumberstrue
collapsetrue
#============================ upload over JTAG ================================
def jtagUploadFunc(location):
if env['toolchain']=='armgcc':
if env['board'] in ['iot-lab_M3','iot-lab_A8-M3']:
return Builder(
action = os.path.join('bsp','boards',env['board'],'tools','flash.sh') + " $SOURCE",
suffix = '.phonyupload',
src_suffix = '.ihex',
)
# LOW: Transceiver osc as CLK (16Mhz when prescaler 0x0), maximum start-up delay
# HIGH: JTAG/OCD off, SPI on, WatchDog override off (can be enabled at runtime), Bootsize 512b,
# start bootsector at 0xfe00 (word address!), save EEPROM on reflash, start at addr 0000
# EXT: BrownOut at 1.9V
# Last fuse fd -> f5 due to immutable bits, otherwise avrdude gives a verification error
elif env['toolchain']=='avr':
return Builder(
action = 'avrdude -c jtag3isp -p m128rfa1 -B 1 -U flash:w:$SOURCE',
#+ ' -U lfuse:w:0xf7:m -U hfuse:w:0xd7:m -U efuse:w:0xf5:m', #if you need to do fuses
suffix = '.phonyupload',
src_suffix = '.ihex',

 

...

and uncomment the following line:

 

Code Block
firstline432
linenumberstrue
collapsetrue
#+ ' -U lfuse:w:0xf7:m -U hfuse:w:0xd7:m -U efuse:w:0xf5:m', #if you need to do fuses

...

Remember that you only need to set the fuses once per change. Once changed, you can recomment the line again.

...