Adding WiMOD as board

Sorry for bothering you. I had a quite close look on many pages but can’t fix my issue sofar. Also contacting the manufacturer brought no success. So finally I am here.
In the Arduino IDE the board WiMOD Module can be added using this in the board manager. Including some more steps.
Is there a way to add this bord also in PlatformIO? Would you be so kind and share a manual how to do that?

1 Like

Integration into PlatformIO is really easy if some internals are known. I’ve created a fork of platform-atmelsam to include the IMST WiMODino board.

Can you check whether

builds, uploads and runs correctly on your board?

Thank you for your work and quick response. I tried to upload a simple blink code but every time the upload fails and the following error message appears:


Found in a different post the Suggestion to add two extra lines in the platformio.ini:

board_upload.use_1200bps_touch = no
board_upload.wait_for_upload_port = no

But this doesn’t solve the issue.

Just for completeness: with the arduino IDE it still works fine on the same COM port

Probably a problem with the bossac uploader version or the flags.

In the Arduino IDE, when you activate “File → Preferences → Verbose Output during Upload” and upload again, what’s the output that appears in the bottom port of the Arduino IDE? (https://pastebin.com/ if output is too long).

Woopsie, then I misread the platform.txt and it actually uses avrdude instead of bossac… That can’t work of course.

I’ve corrected the error. Please remove all C:\Users\<user>\.platformio\platforms\atmelsam* folders and build and upload again. Remove all custom board_upload.. options that you put in, too.

Thank you so much. Unfortunately I still receive the same error.
In the Arduino IDE it works as before.
I share my Arduino settings below. The only remarkable thing I can see is the difference in the COM Port. Since in the terminal output it says something with port 6 but the IDE is set up to 14. in the bord manager it says also port14 is used for the serial usb device.
But the error message in PIO still refers to Port 6

Please upload the logs for project tasks → Advanced → Verbose Upload, too.

The COM6 port can be right, if after the 1200bps reset it appears in bootloader mode on a different COM port, then after firmware upload goes back its original “firmware mode” COM port. This is what the Arduino IDE says, too.

Sketch uses 9608 bytes (3%) of program storage space. Maximum is 262144 bytes.
Performing 1200-bps touch reset on serial port COM14
Waiting for upload port…
Upload port found on COM6

PS C:\Users\<user>\Documents\PlatformIO\Projects\Project Name> pio run -t upload --verbose
Processing wimodino (platform: atmelsam; board: wimodino; upload_flags: -v; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/wimodino.html
PLATFORM: Atmel SAM (8.2.1+sha.0e49b68) (git+https://github.com/maxgerhardt/platform-atmelsam.git#wimod) > WiMODino
HARDWARE: SAMD21J18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES:
- framework-arduino-samd-wimod @ 1.1.0+sha.7cb64a4 (git+https://github.com/maxgerhardt/framework-wimodino.git)
- framework-cmsis @ 1.40500.0 (4.5.0)
- framework-cmsis-atmel @ 1.1.0
- tool-bossac @ 1.10700.190624 (1.7.0)
- toolchain-gccarmnoneeabi @ 1.40804.0 (4.8.4)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 7 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio\build\wimodino\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   6.6% (used 2156 bytes from 32768 bytes)
Flash: [          ]   3.7% (used 9824 bytes from 262144 bytes)
.pio\build\wimodino\firmware.elf  :
 
section            size        addr
 
.text              9568       16384
 
.data               256   536870912
 
.bss               1900   536871168
 
.ARM.attributes      40           0
 
.comment            112           0
 
.debug_frame        436           0
 
Total             12312
<lambda>(["upload"], [".pio\build\wimodino\firmware.bin"])
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
BeforeUpload(["upload"], [".pio\build\wimodino\firmware.bin"])
Auto-detected: COM6
Forcing reset using 1200bps open/close on port COM6
Waiting for the new upload port...
bossac -v --info --debug --port "COM6" --write --verify --reset --erase -U true .pio\build\wimodino\firmware.bin
Set binary mode
Send auto-baud
No device found on COM6
Set binary mode
*** [upload] Error 1

No you’re still using the old version.

You might also need to delete C:\Users\<user>\.platformio\.cache to escape caching issues. It should do a fresh new download of the platform.

Deleted the folders. At least this error disappeared. But after 10 attempts to upload the code the process was ended.
Wanted to create a new project but the board is no longer available in the PIO board list :innocent:

…Weird? You can also delete the entire C:\Users\<user>\.platformio\ folder + restart VSCode for a clean reinstall.

The forked platform version can also be installed in the CLI, which should make the board available in the “new project” wizard.

pio pkg install -g -p "https://github.com/maxgerhardt/platform-atmelsam.git#wimod"

Works totally fine. Thank you! I really appreciate your time, knowledge and work!!
Issues solved. :slight_smile:

1 Like