Page 1 of 1

C++ microcontroller/processor selection

Posted: Mon Nov 20, 2017 11:27 am
by liqiu
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, 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).


>90 IO pins
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.


"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.

Re: C++ microcontroller/processor selection

Posted: Tue Nov 21, 2017 2:00 am
by blue_z
This just seems to be a copy-n-paste of a five-year old post from another site.