Building and uploading firmware

I was able to compile the firmware by following the instructions here: https://github.com/sprk/core-firmware/wiki/Building-Firmware-for-the-Core
Unfortunately, when I got the final steps, I got the following error (and now only one lit LED)

Avidans-MacBook-Air:build avidan$ dfu-util -l
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"
Avidans-MacBook-Air:build avidan$ dfu-util -d 0483:df11 -a 0 -s 0x0800A000:leave -D core-firmware.bin
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x0483 product = 0xdf11
Opening DFU capable USB device… ID 0483:df11
Run-time device DFU version 011a
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash "
Downloading to address = 0x0800a000, size = 24108

File downloaded successfully
Transitioning to dfuMANIFEST state
Error during download get_status

So now I held down the BTN while powering up the device. LED 1/2 are flashing in unison, and LED 0 is steady.

tried it again…this time, i think the difference was this command (i think i ran it last time…but crazier things have happened)

git checkout beta-tester-mem-map

I wish dfu-util output were clearer, but it always says “Error during download get_status” at the end, both on success and some failures. The row of periods followed by “File downloaded successfully” only appear on successful programming.

Sounds like it worked fine after you switched to the beta tester memory map. For the beta tester cores, you do have to be on the beta-tester-mem-map tag. Any questions at this point?

looks like we are good now. Thanks for the clarification!

Is there a good way to see which firmware is running on the core? (Assuming its dfu-util)

Nope, not without some hardcore digging and inference.

im pretty sure i screwed it up again!

so, here is what ive got as my process and output.

$ pwd

/Users/avidan/Development

$ ls
core-common-lib gcc-arm-none-eabi-4_7-2013q2
core-communication-lib usb-bootloader
core-firmware

$ cd core-firmware/build/

$ git checkout beta-tester-mem-map
M build/core-firmware.bin
M build/core-firmware.elf
M build/core-firmware.hex
M src/spark_utilities.c
HEAD is now at afa4a2f… Renamed all instances of marvin to core-firmware
$ emacs …/src/spark_utilities.c
<< modify the Device_Name >>
$ make clean dependents all
<>
make --no-print-directory post-build
arm-none-eabi-objcopy -S -O binary “core-firmware.elf” "core-firmware.bin"
arm-none-eabi-objcopy -O ihex core-firmware.elf "core-firmware.hex"
arm-none-eabi-objdump -h -S core-firmware.elf > "core-firmware.lst"
arm-none-eabi-size --format=berkeley core-firmware.elf
text data bss dec hex filename
21836 1428 3680 26944 6940 core-firmware.elf

<< ENTER DFU MODE>>

$ dfu-util -d 0483:df11 -a 0 -s 0x0800A000:leave -D core-firmware.bin
Filter on vendor = 0x0483 product = 0xdf11
Opening DFU capable USB device… ID 0483:df11
Run-time device DFU version 011a
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash "
Downloading to address = 0x0800a000, size = 23264

File downloaded successfully
Transitioning to dfuMANIFEST state
Error during download get_status

<< Cant get into SmartConfig Mode>>

i’m getting a 404 on that github link, is it for beta testers only perhaps? any way to get a look at it so i can start planning for when i get a spark core?

it should work if you have a github account.

it 404’s for me as well. Is there special permissions for getting access to the firmware? If there is, my github name is @billylindeman, I’d love to gain access to it for development purposes.

@sej7278 @billy Hey guys, you’re right in that right now we’re keeping the firmware to beta-testers only but we’ll be sure to let everybody know when it’s available