shumatech / BOSSA

BOSSA is a flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers. The motivation behind BOSSA is to create a simple, easy-to-use, open source utility to replace Atmel's SAM-BA software. BOSSA is an acronym for Basic Open Source SAM-BA Application to reflect that goal.
http://www.shumatech.com/web/products/bossa
BSD 3-Clause "New" or "Revised" License
361 stars 251 forks source link

lock region documentation to avoid overwriting the last 16kB or so. #86

Open helmut64 opened 5 years ago

helmut64 commented 5 years ago

I have problems to understand the lock option. I like to use BOSSA in an Arduino Zero D21 environment. When Downloading the sketch it erases the entire flash (after the bootloader).

I like to protect (or not to erase) the last remaining 16 kB (of the 256kB D21 flash). I removed already the -e option in the platforms.txt but BOSSA ist still erasing the entire Flash.

Will the lock region be of any help? Do I need to add this feature to BOSSA?

Thank you for your advise.

helmut64 commented 5 years ago

I believe I found out how it works. I can lock 16 regions (0-15), each being 1/16 of the Flash memory. I may can lock the last region (15) in the Arduino platforms.txt bossac command line, in my Sketch I unlock 15 to allow to write into it. With the next Sketch Download it get locked again before erasing.