How to program an FC with 32bit Microcontroller

Post Reply
brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

How to program an FC with 32bit Microcontroller

Post by brewski »

I started with a quad using Crius 328P & when I went to GPS changed FC to Crius AIOP V2 due to memory restrictions & wanting to run all the features of EOS Bandi NaviB7. Prior to release of NaviB7 I looked at going MegapiratesNG to get this functionality but read some bad posts regarding this port from APM.
I occasionally check out MW32bit section to see what is going on & maybe I'm getting wrong impression but it appears to be very fragmented with users going their own way & much flaming. forgetting this what I'm interested in is what programming environment/hardware is used to program these 32bit microcontroller based FCs.

I know that it cannot use the ATMEL Arduino IDE programmer which is relatively easy even for a beginner & I have played with the Texax Instruments 32bit programming environment which is definitely NOT user friendly & also expensive.

If someone could enlighten me as to requirements I am tempted to build my next quad on 32bit FC to see how it compares.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to program an FC with 32bit Microcontroller

Post by timecop »

Have you checked the wiki?
https://github.com/multiwii/baseflight/ ... th-Eclipse
https://github.com/multiwii/baseflight/ ... in-Eclipse

For gnu toolchain the only supported is https://launchpad.net/gcc-arm-embedded
I dunno about "user friendly", but if you can type "make" you should be able to build it.

Problem begins when you have to start debugging on hardware - printf-style debugging is a waste of time (in my opinion), so to actually do any serious (beyond copypasting code from somewhere) development you will also need a debug probe, like stlink, jlink, etc.

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: How to program an FC with 32bit Microcontroller

Post by brewski »

Yes checked the wiki previously & was not inspired to go further. Checked out the github links you showed & saw that code only supported FCs running 32bit microcontrollers running at 16Mhz. What's the point of porting Multiwii to a 32bit processor capable of 72Mhz+ & then running it at same speed as the AVR 8 bit?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to program an FC with 32bit Microcontroller

Post by timecop »

wat.
btw, there's nothing for end-users to "program".
All the things that are configurable (in baseflight) are exposed via cli or configurable by MSP.

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: How to program an FC with 32bit Microcontroller

Post by brewski »

But what are the advantages of running ported MW on 32bit if you cripple it with 16Mhz clock. Sure ADC accuracy of sensors is increased but what other advantages are there? Is there any actual development going on to run MW in true 32bit environment at full microcontroller capable speed?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to program an FC with 32bit Microcontroller

Post by timecop »

I have no idea what you're talking about, baseflight runs at 72 (or 80) MHz. Do you want to contribute AVR emulator to run MultiWii (8bit) on a Cortex-M at "full speed"?

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: How to program an FC with 32bit Microcontroller

Post by brewski »

OK I've obviously got it wrong.
From what I have read across various forums I was led to believe that the 32 bit FCs running Multiwii such as Nase were simply running ported MW code at native 16Mhz.
If Naze & other 32bit FCs are running at 72+Mhz then there are definite advantages besides the resolution that 32bit provides.
You mentioned that all configurable parameters are available using Baseflight. Does this mean that you can upgrade FC firmware as can be done using APM with Mission Planner?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to program an FC with 32bit Microcontroller

Post by timecop »

Why don't you try reading the threads in this forum for more than 30 seconds?
There's a chrome app that deals with firmware flashing/configuration/cli access/etc
https://chrome.google.com/webstore/deta ... figk?hl=en

Even if this stuff WAS running at 16MHz (which it's not), 16bit hardware capture input/output, DMA, tons of flash/ram, and most importantly, ability to debug on hardware (or even while code is running) would already make any cortex-based solution better than tarduino*.

*: for DEVELOPERS. Obviously, end-users probably couldn't give any less fucks.

kilby
Posts: 76
Joined: Wed May 28, 2014 10:17 am

Post by kilby »

Brewski,
There is a huge difference to be had even if a 32 bit processor is hobbled down to the same speed as an 8 bit processor. From the old days a 8mhz 68000 is considerably more than 2 tumes faster than a 4mhz z80.

If you then consider any sort of maths being carried out then it the speed difference increases.

Bringing DMA and all the debugging facilities it brings to the table there is hardly any comparison even at the same clock speed

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: How to program an FC with 32bit Microcontroller

Post by brewski »

I understand the difference as I've been building PCs since micros came out in early 80s. What put me off 32 bit MW was what others were saying on various forums that because it was a port there was no real advantage & programming was way more difficult that AVR. Despite what Timecop said I actually researched this pretty well & decided it looked too hard with minimal support for sensors & peripherals & many on forum sniping at each other for cheap points or to further their own view . At the time I tried to download Baseflight but failed, probably due to running Win8 64bit on my laptop. I have now downloaded Baseflight on my old laptop running Win7 32bit & GUI looks impressive. I see there are many cheap 32bit FCs besides Nase but which 32bit FCs do you recommend to run 32 bit MW with best performance & sensor support especially GPS?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to program an FC with 32bit Microcontroller

Post by timecop »

Pixhawk PX4

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: How to program an FC with 32bit Microcontroller

Post by brewski »

timecop wrote:Pixhawk PX4


Just checked out the specs & salivating. This has to be the base of my next project

nicog
Posts: 88
Joined: Tue Aug 21, 2012 2:21 pm

Re: How to program an FC with 32bit Microcontroller

Post by nicog »

Oh brewski, i think you are looking for a dji naza system. Best 32bits gps performance ever. Be free to check it and buy one. It's your ultimate FC you will need.
I have 4 of them...

larzac
Posts: 5
Joined: Wed Feb 12, 2014 4:42 pm

Re: How to program an FC with 32bit Microcontroller

Post by larzac »

I'd go for a FC that's not blocked to only one software.
For instance the cc3d can run taulabs and baseflight

Post Reply