How to implement an Arduino Code to and ARM Project

Share code examples or discuss embedded software, including device drivers, interrupt handlers, middleware and application code.

Moderators: Markus Girdland, Mattias Norlander

drfarm
Posts: 9
Joined: Fri Jul 07, 2017 11:01 am

How to implement an Arduino Code to and ARM Project

Postby drfarm » Wed Nov 22, 2017 5:03 pm

Hello,
I have an Arduino code that collect the values of 3 sensors (Wind Speed, Wind Direction and Rainfall). I have to use these sensors in my ARM (STM32F091VCx) custom board.

I also have a project with different sensors but I'm kinda lost with the codes and files. I want to know if there is any document that explains how to add a specific sensor in the project and/or how to "migrate" the arduino code to the C code of the project (at least use as base).

Thank you.

frank_ee
Posts: 88
Joined: Wed Apr 05, 2017 5:08 pm
Location: USA

Re: How to implement an Arduino Code to and ARM Project

Postby frank_ee » Thu Dec 21, 2017 8:05 pm

Hello,

Is the current code ANSI C compliant? The Arduino platform is much different than Atollic and you will have to modify the source code for the ARM processor. Start with a new Atollic project and generate new source files based on the current code. What is the interface for the sensors (IIC, SPI, USB, etc)?

CoraDias
Posts: 1
Joined: Mon Mar 26, 2018 4:35 pm

Re: How to implement an Arduino Code to and ARM Project

Postby CoraDias » Mon Mar 26, 2018 4:58 pm

Hi...i am a new user here. As per my knowledge there are lot of modifications required to use the arduino code in ARM. You have use all the valid libraries for ARM which are different from Arduino. Also you have to change the ports I/O according to ARM.

pcb assembly manufacturer
Last edited by CoraDias on Thu Apr 19, 2018 6:04 pm, edited 1 time in total.

frank_ee
Posts: 88
Joined: Wed Apr 05, 2017 5:08 pm
Location: USA

Re: How to implement an Arduino Code to and ARM Project

Postby frank_ee » Sat Mar 31, 2018 6:14 pm

Hello,

To be honest, Arduino is a great learning platform. You should use an evaluation board made by STM and develop on that. Eventually, you will have to design your own board that is application specific with an STM ARM processor.

paulvdh
Posts: 2
Joined: Tue Oct 23, 2018 5:42 pm

Re: How to implement an Arduino Code to and ARM Project

Postby paulvdh » Tue Oct 23, 2018 5:53 pm

In the hobby world there is a lot going on with the STM32F103C8T6
Mainly because it is extremely cheap (USD 1.5 for a development boad from Ali / Ebay / China.

RogerClarkMelbourne from stm32duino.com has ported the arduino framework to the "blue pill" board as it is also called.

You might also want to consider Platformio.
This is a build system for ... almost everything, including arduino. stm32 CUBEmx LibOpenCM3 and much more.
You can use it with the included IDE (Atom) which seems quite decent, or use the command line version, which can easily be integrated in any IDE that can spit out a few commands in some terminal emulator.


Return to “Embedded target code development discussions”

Who is online

Users browsing this forum: No registered users and 1 guest