Vex Cortex Low-Level Interfacing

First off, let me note that everything I’m discussing here is purely academic, just for the sake of discussion. I do not plan on writing any competition code in anything but RobotC.

I was curious if anybody knew of a publicly available assembler or GCC cross compiler for the processor unit within the cortex. RobotC is great for competition, not so great for experimentation for non VRC type stuff.

According to the VEX product page, it contains a STMicroelectronics ARM® Cortex® M3. It also gives specs: 90 MIPS instruction rate, 64KB RAM, 384KB flash storage. This is about all the information I can find on the hardware from VEX. (OFC we can safely assume this is ARM32 architecture)

I did my own searching, but I had quite a bit of difficulty identifying the correct chip as there are dozens in existence just like the one described . The closest thing I found was [this](http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f3-series/stm32f302/stm32f302vd.html m32f302/stm32f302vd.html) Is it the correct model? A model # would be extremely convenient if anyone knows of it? Alternatively, a link to the correct development tools would also be helpful.

Now for a separate and unrelated topic:
Does RobotC have support for serial comms over USB? I stumbled across the UART serial commands, which are helpful, but I’d prefer USB because one thing I’d be interested to test has USB connector which is easy to use.

Thanks, any information is greatly appreciated.

ROBOTC does not have a way to output over USB. UART to USB connectors are cheap though.

You may want to check out PROS. It uses the GCC compiler to allow you to use actual C for your robot. It comes with UART support as well.

@factorsofx ah most interesting. Thank you for pointing that out, I’ve never seen it. It also appears to be open source, which would answer my first question. I will just dissect that and take a look at the toolchain.

@tabor473 ok, I figured as much, it wouldn’t be safe design to output to the port that it recieved instructions from. Thanks.

PROS is a Kernel for the Cortex which is compiled with GCC, the Kernel is Open Source and can definitely be compiled and uploaded on it’s own.

If you’re interested I went through building it from scratch here:

https://www.youtube.com/watch?v=ntromMig0BQ

@Cody yeah PROS is quite impressive actually. I never realized there were two internal processors. Handling watchdogs must’ve been a nightmare. https://vexforum.com/t/open-source-development-for-the-cortex/21578/1

Ok, so just too update anyone who may be interested, after a quick look at the PROS kernel src, the cortex is evidently in the STM32F10x tree (based on include for this header). I will continue to look into the PROS src for more information about the STM processor and the service processor, but from what I currently know I’m reasonably confident that the STM processor (user) is one of the three from the STM32F103 line:
-STM32F103RD
-STM32F103VD
-STM32F103ZD
If I can’t find it in PROS, I may be able to test high voltage to make the determination once season starts up again and I have access to a cortex.

I just opened up a Cortex to take a look, and the chip says it’s an STM32F103 VDH6

Just FYI, the “other” open source project for the cortex is here.

ah thank you very much. Figured it was in that line from the specs, but confirmation is nice.

@jpearman yeah I was looking at that also. Very nice ;).

@Ashwin Gupta Also look for the paper done by @edjubuh on the Cortex. I don’t have the link offhand, but I know it’s linked on this forum.

Assuming you mean this document, you should take it with a grain of salt-- upon further investigation while we were working on improving the flasher, I found that there were some inaccuracies (e.g. the stuff about parity).

I mean the process is the same. Some technicalities about the handshake, especially with changing parity are incorrect based on final analysis and what IFI does (but was originally based on what ROBOTC, EasyC, and formerly PROS did).

@hotel and @edjubuh got it. That paper is very helpful, thanks.

Has anyone considered the new GNAT MAKE Contest that will with $16,000 total prizes for using GNAT Ada? It supports a lot of Linux platforms and devices including the new Raspberry Pi 3 and also supports Lego Mindstorm.

This may be a late response, but no, I had not heard of this competition. It looks very interesting! Maybe I’ll check it out in 2018 :slight_smile: