C++ microcontroller/processor selection

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

liqiu
Posts: 1
Joined: Mon Nov 20, 2017 10:56 am

C++ microcontroller/processor selection

Mon Nov 20, 2017 11:27 am

Hi to all, ask for suggestion for my question. The situation is following: I am having trouble selecting a microcontroller/processor for a robotics project in C++. I have a program working on my computer that is 1.5+ KLOC and relies on data in twenty other files to function, so please do not suggest I use another language. I tried translating it to C, but could not get it to work, perhaps because of the program's heavy reliance on fstream and strings. The program is about 1 MB on my computer right now and takes up 3 MB while running, so I suppose the microcontroller/processor would need either to be capable of supporting 4 MB of ram if it is von-Neumann/MHA and 1 MB of flash and 3 MB of ram for Harvard. I need PWM http://www.kynix.com/Search/PWM.html, SPI and UART/USART on the processor to communicate with other sensors, and I plan to use a hard drive for the other files and external ram for the program and its data. I will need at least 90 IO pins (40 IDE + 40 servos + sensors).

Summary:

>90 IO pins
PWM
SPI
UART/USART
if von-Neumann/MHA, capable of supporting >4 MB of ram
if Harvard, >1 MB program flash and >3 MB of ram
supports C++
What do you suggest? Please also provide information on how to program the processor, if possible.

So far, I have found Freescale’s i.mx25, but I am not sure how to connect this processor to my computer for programming, if it uses C++, or the details of how to turn my current Windows .exe program into a .hex compatible with this processor.

@m.Alin I am using a hard drive because I started out with AVR and found a tutorial describing how to communicate with an hdd from an AVR. I could not find a similar SD card tutorial.

@MikeJ-UK The program currently runs on my laptop, an x86-64 Windows 7.

@darron

"1MB binary implies more than 1500 LOC" The program is 643 KB now, not 1 MB. I apologize for the confusion. I said 1 MB because I am still working on and expanding the program, so the prospective processor will need to be able to handle its future larger size.

"add a peripheral board for the servos" "io offloading onto an FPGA..." I do not know how to do this. After a quick search, I was unable to find any affordable FPGA's. Do you know of any >$50?

@Rocketmagnet 1500 lines.

@vicatcu I do not think 8 io pins will be enough.

@AndrejaKo For the most part, the servos will not need to be controlled at the same time. I like your multiple microcontroller/demultiplexer option, but I do not understand what is wrong with using an i.MX25 with Linux? It has 128 io pins.
Thanks all guys.
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: C++ microcontroller/processor selection

Tue Nov 21, 2017 2:00 am

This just seems to be a copy-n-paste of a five-year old post from another site.

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 2 guests