SAM4S Programming without External Programmer - Husky Setup

Hi everyone,

I have a ChipWhisperer Husky with the CW308 SAM4S (QFN48) target board. I’m trying to run the Fault 101 tutorials but discovered that the SAM4S doesn’t have a built-in bootloader like the STM32F targets.

My questions:

  1. Is there any way to program the SAM4S target WITHOUT an external programmer (J-Link, etc.)?
  2. Do SAM4S boards from NewAE come pre-programmed with any firmware?
  3. Are there any workarounds to run glitching tutorials without programming the SAM4S?
  4. Has anyone successfully used alternative programmers (Arduino, RPi, ST-Link clone) with SAM4S?

Setup:

  • ChipWhisperer Husky
  • CW308 SAM4S QFN48 Target
  • ChipWhisperer 5.7.0
  • Following courses/fault101 tutorials

I cannot purchase additional hardware at this time, so I’m looking for software solutions or workarounds.

Thanks for any help!

SAM4S should have a built-in SAM boot assistant (SAM-BA®). You should be able to use SAM4SProgrammer, something like:

prog = cw.programmers.SAM4SProgrammer
cw.program_target(scope, prog, "/path/to/firmware.hex")

I definitely used that previously with success. It should use the ERASE pin of the SAM4S to first erase it and then use SAM-BA bootloader to load the firmware (over serial).

This thread is talking about a similar issue.

Hopefully that helps, happy glitching :slight_smile:

I encourage you to upgrade to the 6.0.0 release: it has improvements to the SAM4S programmer.