platform-atmelsam icon indicating copy to clipboard operation
platform-atmelsam copied to clipboard

Feature Request: Add support for Teknic ClearCore Board

Open bveenema opened this issue 3 years ago • 26 comments

Overview

ClearCore is an industrial grade controller board created by Teknic, a motor manufacturer. ClearCore specifically targets industrial controls with 24V tolerant I/O and built-in motor control interfaces.

Teknic has released a CMSIS based motion and I/O library setup for Atmel Studio as well as an Arduino frameworked wrapped that integrates the CMSIS libraries.

ClearCore uses an Atmel SAM ATSAME53N19A processor which is most similar to the existing Adafruit Feather M4 Can processor (SAME51J19A)

Resources

Additional Information

I have not found a concise guide for adding boards to PlatformIO. If one exists, I can do the heavy lifting with support.

bveenema avatar May 08 '21 15:05 bveenema

I’m currently starting a ClearCore project. This would be an interesting option to have available. The default environment supported by Tecnik is Atmel Studio (now rebadged Microchip Studio) and is seems to be Windows-only.

thestumbler avatar Sep 20 '21 19:09 thestumbler

I’ve just picked up a project using the ClearCore and direct integration with my preferred IDE would be awesome

Mozburg avatar Oct 01 '21 20:10 Mozburg

Likewise, I am just starting with ClearCore and would like this option. PlatformIO is much more developed than Arduino IDE.

aprice2704 avatar Oct 18 '21 00:10 aprice2704

Same here. Would love PlatformIO support as the default IDE is pretty clunky and Arduino would be pretty limiting for such a powerful controller.

Andrea-Loriedo avatar Oct 18 '21 09:10 Andrea-Loriedo

Same. Just got mine and would be very keen to get it up and running with platformio

jahasu avatar Nov 07 '21 09:11 jahasu

I also support the addition of the ClearCore board

sparky650 avatar Feb 02 '22 18:02 sparky650

"me too". Just got one of these to support a client project, would LOVE to use PlatformIO.

jeffrizzo avatar Mar 02 '22 18:03 jeffrizzo

I started making a board file, but cant get it to work. If anyone can help with this it would be much appreciated as I would also like to use PlatformIO with the ClearCore. Below is teknic_clearcore.json

{ "build": { "arduino":{ "ldscript": "flash_with_bootloader.ld" }, "cpu": "cortex-m4", "extra_flags": [ "-DARDUINO_CLEARCORE", "-D__SAME53N19A__", "-D__SAMD51__", "-D__FPU_PRESENT", "-DARM_MATH_CM4", "-DENABLE_CACHE", "-DVARIANT_QSPI_BAUD_DEFAULT=50000000" ], "f_cpu": "120000000L", "hwids": [ [ "0x2890", "0x0022" ], [ "0x2890", "0x8022" ] ], "mcu": "same53n19a", "system": "samd" }, "debug": { "jlink_device": "ATSAME53N19A", "openocd_chipname": "atsame53N19A", "openocd_target": "atsame5x", "svd_path": "ATSAME53N19A.svd" }, "frameworks": [ "arduino" ], "name": "Teknic ClearCore", "upload": { "disable_flushing": true, "maximum_ram_size": 196608, "maximum_size": 507904, "native_usb": true, "offset_address": "0x4000", "protocol": "sam-ba", "protocols": [ "sam-ba", "jlink", "atmel-ice" ], "require_upload_port": true, "use_1200bps_touch": true, "wait_for_upload_port": true }, "url": "https://teknic.com/products/io-motion-controller/", "vendor": "Teknic" }

evlquaker avatar May 02 '22 13:05 evlquaker

Sorry the formatting was not preserved when I pasted it. :-/

evlquaker avatar May 02 '22 13:05 evlquaker

This is off-topic, but it concerns a problem I have with ClearCore from Teknic. If you have the time, please read my post at:

https://forum.arduino.cc/t/corrupt-board-manager-json-clearcore/999196

urbhar580 avatar Jun 04 '22 12:06 urbhar580

I'm willing to contribute USD to help make progress with this.

buzzysale avatar Sep 29 '22 01:09 buzzysale

Any updates on this? Has anyone made a board file?

jacobschleining avatar Feb 08 '23 15:02 jacobschleining

I am not familiar with using PlatformIO. However I did recently convert my build process away from Atmel Studio to using G++/ CMAKE. I'm currently setup using GDB with the Atmel ICE, because that's the debugging hardware already installed in my project. But I plan to test with the Black Magic Probe as well.

If this can help the port-to-PlatformIO project move forward, let me know and I'll post my build files on GitHub.

thestumbler avatar Feb 08 '23 22:02 thestumbler

+1 this would be super helpful if someone knows how to make the board file

mrccwolf avatar Feb 23 '23 04:02 mrccwolf

I am not familiar with using PlatformIO. However I did recently convert my build process away from Atmel Studio to using G++/ CMAKE. I'm currently setup using GDB with the Atmel ICE, because that's the debugging hardware already installed in my project. But I plan to test with the Black Magic Probe as well.

If this can help the port-to-PlatformIO project move forward, let me know and I'll post my build files on GitHub.

I would be very interested in your build files for this, would be super helpful if you put them up!

Andrea-Loriedo avatar Feb 23 '23 09:02 Andrea-Loriedo

I tried flashing a clearcore using the SparkFun_SAMD51_MicroMod board definition and it flashed but then the USB port no longer appears. Maybe bricked, or maybe needs to be brought back to life using a debugger.

patrickwasp avatar Mar 09 '23 16:03 patrickwasp

Like I said I have some $$$ to help pull this off. Trying to port grbl to the Clearcore and having a hell of a time (mechatronics engineer - not enough ee, not enough me)

buzzysale avatar Mar 09 '23 17:03 buzzysale

Like I said I have some $$$ to help pull this off. Trying to port grbl to the Clearcore and having a hell of a time (mechatronics engineer - not enough ee, not enough me)

I'll pitch in to get an Upwork freelancer to do the NRE job. I'm not sure what the effort/cost is to add a custom board though.

patrickwasp avatar Mar 09 '23 17:03 patrickwasp

I looked into this again tonight. It seems that adding the board is more than trivial. I think just making a board.json file is not sufficient as (I don't believe) there is an existing toolchain configured for the Atmel SAM ATSAME53N19A processor. The Adafruit Feather M4 Can board seems to be the only other example of a SAM-E microcontroller. Adafruit uses the SAM-D tool chain. Perhaps its close enough? Configuring the whole toolchain is a bit beyond my current knowledge. I also no longer have a ClearCore board as I installed it in a project for my company. I really hope someone can figure this out.

evlquaker avatar Mar 10 '23 00:03 evlquaker

How tough is mastering Platform IO? As I said, I have the toolchain sorted out for Gcc/G++ but I've never used PlatformIO. I haven't posted a repo yet because I need to test with the bare ClearCore repo, currently it's working for my custom code which I can't release.

thestumbler avatar Mar 10 '23 01:03 thestumbler

I am not sure what you mean by "mastering Platform IO". Do you mean learning enough to make a new board?

https://github.com/platformio/platformio-docs/blob/develop/platforms/creating_board.rst

That's a good place to start to learn the basics.

Then look at Adafruits board as an example

https://github.com/platformio/platform-atmelsam/blob/develop/boards/adafruit_feather_m4_can.json

The ClearCore board file for Arduino

https://github.com/Teknic-Inc/ClearCore-Arduino-wrapper/blob/master/package_clearcore_index.json

Then I guess its mainly an issue of figuring out how PlatformIO pulls in the tool chain dependencies. I hope this helps someone

evlquaker avatar Mar 10 '23 01:03 evlquaker

I'm also very interested in adding this board to platform IO. Not sure I can contribute any useful skills here but would greatly appreciate this addition and would gladly test it.

NWClimber avatar May 06 '23 22:05 NWClimber

I did a fair amount of research into what would be required to do this. I believe it would require adding a Custom Development Platform to PlatformIO in addition to all the board stuff. This is because the existing AtmelSAM Platform https://github.com/platformio/platform-atmelsam does not support SAM-E architecture. I don't know what compiler flags are required for this. It could probably be figured out by digging into the Arduino IDE build /upload scripts.

evlquaker avatar May 07 '23 00:05 evlquaker

If we can get enough interest in this forum then maybe I can convince Teknic to do it for us ;-)

evlquaker avatar May 07 '23 00:05 evlquaker

With the help of @maxgerhardt I added support for the ClearCore.

While the pull request is being considered you can use your ClearCore in PlatformIO by using the following config:

[env:clearcore]
platform = https://github.com/patrickwasp/platform-atmelsam
board = clearcore
framework = arduino

patrickwasp avatar Aug 28 '23 13:08 patrickwasp

@patrickwasp and @maxgerhardt that is awesome news! Thank you! I look forward to trying it. That really made my day.

evlquaker avatar Aug 28 '23 21:08 evlquaker