Bare metal programming

I want to try bare metal programming the core. But I am unsure what I need to keep the USB bootloader alife.
If I would create an empty project, dropping out all the Spark’s firmware. Maybe even write nonsense to the flash. Would the USB flash loader be alife and I can reprogram without a JTAG programmer? Or is there a chance of bricking the core.

Maybe anyone has some minimal project which only does some hardware initialization and may blink the LED or something.

What would be in the core if I would program such an empty firmware. Init code or maybe even a network driver? The bootloader?

Thank you

1 Like

@Bluescreen, ALL the code for the Core (and soon the Photon and Electron) is open source and available here. :smile:

The bootloader is also locked on your core so you shouldn’t really be able to brick it. You should always be able to get into DFU mode I believe but I’m honestly not sure if you completely wipe all firmware code…

If you buy a STLink V2 JTAG programmer you can do anything with the core.

The Spark JTAG shield is nice but is just wiring and pull-ups and could easily be made a home (it is inexpensive though and could save you time).