Hello,
Please I need to make some slight modifications to D11-Firmware, compile again and reprogram mkrmotorshield (indeed is a nano motor carrier). I honestly haven't found the way to do it.
Which board should I chose from Tools->Boards ? I am not able to see "mkrmotorshield" as it is indicated in the header comments inside the D11-Firmware.ino file.
The idea is to use the Nano 33 IoT to send the new compiled binary through i2c as it is contemplated in Flasher.
The MKRMotor Carrier is a shield that will work with several different MKR family boards. (You have a Nano-compatible version instead? In that case, it ought to work with several different Nano boars.)
You should set your "board" to "Nano 33 IOT", if that's the board that you're using that contains the CPU.
Never mind; I see you were talking about firmware in the motor board itself.
In order to make sure to provide a useful reference for everyone who might have a similar question in the future, I'm going to provide complete instructions. I hope you'll forgive me if some of this information is obvious to you. It might not be for everyone and I'd rather provide too much information than too little. Those who already know a step are welcome to skim over it.
Install the Arduino boards platform for the ATSAMD11 chip on the motor carrier
Unfortunately, Arduino never bothered to provide Boards Manager installation support for this platform, so you must install it manually.
Start the Arduino IDE if it's not already running.
Select File > Preferences from the Arduino IDE menus.
Take note of the path shown in the "Sketchbook location" preference.
Restart the Arduino IDE.
The IDE won't notice a manually installed platform until it has been restarted.
Install the "MattairTech SAM M0+ Boards" platform
This is done to get the version of the SAMD toolchain that is compatible with the boards platform used for the ATSAMD11 microcontroller on the motor carrier.
Enter the following URL into the "Additional Boards Manager URLs" field:
to some convenient location outside the library folder.
The Arduino IDE treats the sketches in the libraries folders as read only and we need to be able to write to the sketch folder, so it's necessary to move it even if you don't need any modifications.
Select File > Open from the Arduino IDE menus.
Select the file D11-Firmware.ino from the folder where you moved the sketch in the previous step.
Click the Open button.
Make any modifications you would like to the "D11-Firmware" sketch.
Select Tools > Board > MattairTech SAM M0+ Boards (in sketchbook) > MKR Motor Shield from the Arduino IDE menus.
Select Tools > Bootloader Size > 4KB bootloader from the Arduino IDE menus.
Select Tools > Pinmap > Complete from the Arduino IDE menus.
Select Tools > Link time optimization > Enabled from the Arduino IDE menus.
Select Sketch > Export compiled Binary from the Arduino IDE menus.
Wait for the compilation to finish successfully.
Select Sketch > Show Sketch Folder from the Arduino IDE menus.
This will open the "D11-Firmware" sketch folder in your file browser software. You will see there a file named D11-Firmware.ino.MKRMotorShield.bin. That is the firmware that was generated from the sketch you compiled.
If you have an Atmel ICE or other CMSIS-DAP compliant programmer/debug probe attached to the SWD header on the carrier then you can use Sketch > Upload Using Programmer instead of "Export compiled Binary" to directly flash the firmware to the ATSAMD11 via the Arduino IDE. In this case, you can use the Tools > Bootloader Size > No bootloader, which will give more program memory for the firmware sketch to use.
NOTE: This complex sketch contains essential source code under its src subfolder. Unfortunately, the classic Arduino IDE's File > Save As... functionality has a bug that causes the src subfolder to be lost when you save a sketch to a new location. So make sure you manually copy the sketch to a new location if you need multiple copies of it.