Baseflight aka multiwii port to stm32

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Post by strips »

I tested PH today and got +/- 3m drift in a breeze. So it works but not optimal. Gonna look into some tuning but I have a feeling I will not see the same results as in Harakiri.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re:

Post by e_lm_70 »

strips wrote:I tested PH today and got +/- 3m drift in a breeze. So it works but not optimal. Gonna look into some tuning but I have a feeling I will not see the same results as in Harakiri.


+/- 3m is possible the error from your GPS module.

My NEO6M without any bottom shield (also called GPS "Mounting backplane") ... was giving me +/- 8 meter error ... slow moving errors : impossible to filter out.

As said by TimeCop ... there is nothing better the a POLE for implement a GPS PH :mrgreen:

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Sorry for spam but wt* is this:

https://github.com/multiwii/baseflight/ ... cf6c4be3cd
Looks like a declaration of war, is that necessary? I know google also reveals: http://fr.wikipedia.org/wiki/HydraIRC
http://www.hydrairc.com/content/developers - don't know but baseflight should stand above those regulations and open source war is a waste of time IMHO.
#NotVeryFunnyThatStuff
Cheers Rob

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Baseflight aka multiwii port to stm32

Post by copterrichie »

Is Baseflight DEAD? If so, others should be able to pick up the ball and run with it right?

User avatar
Dilbert66
Posts: 45
Joined: Fri Apr 04, 2014 6:09 pm

Re: Baseflight aka multiwii port to stm32

Post by Dilbert66 »

Far from it.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Baseflight aka multiwii port to stm32

Post by copterrichie »

Dilbert66 wrote:Far from it.


Image

User avatar
Dilbert66
Posts: 45
Joined: Fri Apr 04, 2014 6:09 pm

Re: Baseflight aka multiwii port to stm32

Post by Dilbert66 »

Not to everyone. Hardware ports to other platforms being worked on. Timecop has other fish to fry..

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: Baseflight aka multiwii port to stm32

Post by fiendie »

Crashpilot1000 wrote:Sorry for spam but wt* is this:

https://github.com/multiwii/baseflight/ ... cf6c4be3cd
Looks like a declaration of war, is that necessary? I know google also reveals: http://fr.wikipedia.org/wiki/HydraIRC
http://www.hydrairc.com/content/developers - don't know but baseflight should stand above those regulations and open source war is a waste of time IMHO.
#NotVeryFunnyThatStuff
Cheers Rob


Rob,

you should have noticed by now that you don't have to take everything (anything? :D) dongs says at face value.
Besides, theoretically you could only relicense contributions or code that wasn't copied from another project anyway. And you can't retroactively relicense anything. So it's more of a taunt really.

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: Baseflight aka multiwii port to stm32

Post by fiendie »

copterrichie wrote:
Dilbert66 wrote:Far from it.


Image


So are we posting chat logs out of context again, is that it?
At least you should have the balls to discuss that in the channel and not lurk there like the coward you are.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

fiendie wrote:
Crashpilot1000 wrote:Sorry for spam but wt* is this:
https://github.com/multiwii/baseflight/ ... cf6c4be3cd

Besides, theoretically you could only relicense contributions or code that wasn't copied from another project anyway. And you can't retroactively relicense anything. So it's more of a taunt really.


Hahahah!

Yes, HydraIRC's source was made available for others to review for security and educational purposes is somewhat restrictive :D At the time I'd had enough of the open-source zealots trying to take the phase 'open source' and turning it into something other than what the words meant; the opposite of open is closed - it wasn't, since you could open it!, and open does not mean free either.

I keep meaning to publish the code since I stopped working on that project many many years ago, anyway that's a bit off-topic. Stop by #hydrairc on freenode if you want to discuss that.

But yes, timecop is wrong, you can't relicense any code unless the licence says you can, GPL licences say you can use a later version of the licence, so timecop is wrong and doesn't have a leg to stand on and I'm free to use the code under the terms of the GPL licences that applies.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

fiendie wrote:At least you should have the balls to discuss that in the channel and not lurk there like the coward you are.


I'd love to comment on that in the channel but fiendie +q'd me because timecop threw a tantrum because I forked his code and was using a multiwii irc channel to discuss a multiwii fork! :roll:

[2014-05-25 15:59:49] *** dongs (~no@bcas.tv) left ("out of here until hydra is removed")
[2014-05-25 16:06:10] *** ChanServ sets channel #multiwii mode +q *!*@5751c98f.skybroadband.com
[2014-05-25 16:07:33] -ChanServ- You have been quieted on #multiwii by fiendie
[2014-05-25 16:07:57] *** dongs (~no@bcas.tv) joined

:lol:

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Baseflight aka multiwii port to stm32

Post by e_lm_70 »

What a paradox here.

Assuming this sentence is right:
+2) You can NOT:
+2.1) Use the source to create derivative works. (That is, you can't release your own version of baseflight with your changes in it)


Then baseflight should not even exist, since it should not have been allowed to make a derivative work from MultiWii

Looks like a declaration of war, is that necessary?


Very strange indeed ...

Anyhow ... people are selling product with open source inside without any problem at all, mainly selling APM based copter is looking more and more popular in these days ... so ... it is just looking like a "scarecrow"

:geek:

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

further to this:

http://www.gnu.org/licenses/gpl-faq.htm ... herLicense

http://www.gnu.org/licenses/gpl-faq.htm ... ThirdParty

and from section 7 of the GPL v3:

"All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term."

See also section 10.

Dongs should also be aware of section 8. Termination, since it looks like he violated the GPL and lost his rights to use it and the code when he made that change:

"You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation."

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: Baseflight aka multiwii port to stm32

Post by fiendie »

dominicclifton wrote:
fiendie wrote:
Crashpilot1000 wrote:Sorry for spam but wt* is this:
https://github.com/multiwii/baseflight/ ... cf6c4be3cd

Besides, theoretically you could only relicense contributions or code that wasn't copied from another project anyway. And you can't retroactively relicense anything. So it's more of a taunt really.


But yes, timecop is wrong, you can't relicense any code unless the licence says you can, GPL licences say you can use a later version of the licence, so timecop is wrong and doesn't have a leg to stand on and I'm free to use the code under the terms of the GPL licences that applies.


I am pretty sure he is aware of that...
So this whole discussion is an exercise in futility.

Just keep making it worse, everybody loses.

This little jab has been blown way out of proportion.

There is nothing to see here people, please move along.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

fiendie wrote:There is nothing to see here people, please move along.


Actually one good thing has come out of it, it reminded me that the GPL notices were missing from all the source files and the GPL license file was missing. This has been corrected in Cleanflight, baseflight still needs to be correctly updated.

Please see https://github.com/hydra/cleanflight/co ... 38e5492f44

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

So please...tell us "ordinary users" wtf is going with good baseflight FW? Dead? Why? And what nasty hardware bug in rev5 (mine is purple) is it?

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Works, business as usual, no problem.
I've got this "dominicclifton" forum user on ignore, so I'm not sure what's going on.
nasty hardware bug = the pwm/i2c interrupt race condition, stuff, fixed, move along.
that irc screenshot is pretty old.

btw, folks, the "exception" to the license ONLY APPLIES TO ONE PERSON and unless you're that person, baseflight is licensed under GPL3. Relax the fuck up, smoke a bong, and get fucking hiiiiiiiiiiiiiiiigh.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

I've tested the latest bf from 2.6.2014...but I use CPPM so don't know about PWM bug. But I know that GPS is working better then before. At least for me. My quad stayed in max 1m with PH and there was a little wind. So very good. Return to home works good like before.

dongseong
Posts: 5
Joined: Sat Jun 07, 2014 1:10 pm

Re: Baseflight aka multiwii port to stm32

Post by dongseong »

Hi,
I am trying to compile baseflight code (R473) with GNU tools 4.7.4 20130913 on Ubuntu 10.04.
It created baseflight_NAZE.hex, but the size was too big, 210723 bytes, and could not be executed on a chip.
The size of the original hex which came with the code, baseflight.hex, was 157588 bytes, and it is fine.
I confirmed the optimization was -Os, and also tried with Sourcery bench lite, without success

Can anyone explain me why the size was too big?
Thanks
DS

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

What is R473? Is that the stuff in SVN? You should probably use source from github: https://github.com/multiwii/baseflight
As for hex too big, use gcc-arm-embedded arm compiler, since it has proper newlib/nano stuff.

dongseong
Posts: 5
Joined: Sat Jun 07, 2014 1:10 pm

Re: Baseflight aka multiwii port to stm32

Post by dongseong »

Hi TC,
Thanks for quick reply, but still have same problem (hex size is too big)
This is the way I did.
1) Downloaded the code you mentioned above (https://github.com/multiwii/baseflight)
2) Installed the latest gcc-arm-embedded 4.8.3 20140228 on Ubuntu 10.04
3) The size of original baseflight.hex which came with the code is 170826, and it works fine
4) The size of baseflight_NAZE.hex is too big, 222497, and does not work.
5) When compiled, I used make clean, and then make with the original Makefile
6) I confirmed Optimize is -Os

Is there anything I need to check?

Thanks for your help
DS

User avatar
Dilbert66
Posts: 45
Joined: Fri Apr 04, 2014 6:09 pm

Re: Baseflight aka multiwii port to stm32

Post by Dilbert66 »

it's not the size of the hex that matters, it's how you use it :)

I use the same same setup with linux and my hex comes in at 222116 with GCC and arm embedded. It works fine. Hard to say why yours won't work. Are you compiling via Eclipse or are you using the makefile directly?

dongseong
Posts: 5
Joined: Sat Jun 07, 2014 1:10 pm

Re: Baseflight aka multiwii port to stm32

Post by dongseong »

I use the Makefile directly on Ubuntu 10.04.
Actually, I tried to use Eclipse also, under Windows XP and Vista, the result was same.

My board is Free Flight V1.2 China made, which has STM32F103C8T6.

The reason I think it is matter of size is, when download the original working baseflight code,
STM downloader says, the download size is 56012 byte (hex size 170826), but
when download the problematic hex (hex size 222497), it says the download size is 65332, which is max size of the chip
Free flight board has.

DS

User avatar
Dilbert66
Posts: 45
Joined: Fri Apr 04, 2014 6:09 pm

Re: Baseflight aka multiwii port to stm32

Post by Dilbert66 »

Does it actually download it but not work? or does it refuse to download it? Some of those stm32f103c8 do have 128k of flash even if they are listed as 64k from what I understand.

edit: FYI, the later rev's of naze32's (not sure when the switch was), use an stm32f103CB which is a 128k device so has plenty of room for code.

dongseong
Posts: 5
Joined: Sat Jun 07, 2014 1:10 pm

Re: Baseflight aka multiwii port to stm32

Post by dongseong »

It is download, but not executed. I think Free Flight v1.2 board has STM32F103C8T6, which has 64k flash.
I believe ST downloader (Flash loader Demo) does not check the size of hex, and it just tries to download.
If naze32 has 128k flash, it will not have a problem.
I may need to try with STM32F103CB chip, maybe I am tyring with a wrong chip...






If NAZE32 has 128k flash, I think

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

[QUOTE]My board is Free Flight V1.2 China made, which has STM32F103C8T6.[/QUOTE}
That's the problem.
Few years ago, C8T6 actually included 128k flash, but apparently recent versions are actually 64k.
So, gcc build IS over 64k, and doesn't work if you flash it. So that's why.
While current binary is under 64k built with armcc, gcc still fails to optimize as well.
Anyway, no choice but replace mcu to F103CBT6 (128k version)

dongseong
Posts: 5
Joined: Sat Jun 07, 2014 1:10 pm

Re: Baseflight aka multiwii port to stm32

Post by dongseong »

Thanks for the clarification, Timecop

harpo1
Posts: 7
Joined: Fri Apr 25, 2014 12:43 am

Re: Baseflight aka multiwii port to stm32

Post by harpo1 »

Full naze32 and taranis radio. I have my modes setup on a three position switch. When I change the switch position I see it change in baseflight config but the board led's don't change. Any help would be appreciated.

theailer
Posts: 49
Joined: Tue Sep 24, 2013 9:06 pm

Post by theailer »

Did u click save?

harpo1
Posts: 7
Joined: Fri Apr 25, 2014 12:43 am

Re:

Post by harpo1 »

theailer wrote:Did u click save?


I did. The problem ended up being the failsafe_delay set to 0. I have a receiver fs but read in a thread to set the failsafe on the naze32 as well in case the receiver gets disconnected. They suggested O and default was 10. I set it to 1 and everything works again. Not sure why this prevented the flight modes from changing. Maybe TC can chime in with a little insight.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Why would anyonee set failsafe_delay to 0? That means it would failsafe on every cycle, which is dumb.
Again, its also dumb that GUI/cli allows setting it to zero, but... whatever I guess.

harpo1
Posts: 7
Joined: Fri Apr 25, 2014 12:43 am

Re: Baseflight aka multiwii port to stm32

Post by harpo1 »

timecop wrote:Why would anyonee set failsafe_delay to 0? That means it would failsafe on every cycle, which is dumb.
Again, its also dumb that GUI/cli allows setting it to zero, but... whatever I guess.


Here's the post where it was suggested.
http://www.rcgroups.com/forums/showpost ... count=1965

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: Baseflight aka multiwii port to stm32

Post by Gaijin »

Anyone talented fancy playing with optical flow?

This looked pretty good value for experimentation

http://www.goodluckbuy.com/cjmcu-110-op ... oller.html

http://copter.ardupilot.com/wiki/optical-flow-sensor/

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Baseflight aka multiwii port to stm32

Post by Truglodite »

tc, or any other coder talented enough...

I really dig the Rapid ESC flashing software included in the configurator. It's so convenient that it made me think, wouldn't it be perfect if Naze32 was included in the programmer drop down box? I wondered if we could use Naze32 to flash our ESC's instead. IDK if it's something that could be added to baseflight, or if it would be easier to just make a 'utility firmware'. I don't even know if it's feasible with the hardware.

I'm admittedly biased on this... I don't have a USB linker tool and I can't get to the ESC 5V lines without butchering my mini frame. If this gets done, I'll donate the cost of a USB linker to the responsible dev. :)

Kev

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

It's definitely doable. Firmware could act as usb linker (after all, its jsut a USB + serial) or it could just flash internally from FC itself. No, I don't have the time needed to implement it.

jihlein
Posts: 27
Joined: Sat Sep 08, 2012 3:10 pm

Re: Baseflight aka multiwii port to stm32

Post by jihlein »

Firmware could act as usb linker


This is a really neat idea. I may take a stab at it time permitting.

shadowjig
Posts: 16
Joined: Thu Jun 26, 2014 12:22 am

Re: Baseflight aka multiwii port to stm32

Post by shadowjig »

I'm confused on where to look for good documentation regarding the feature of baseflight. How do I setup POWERMETER? I have a current sensor, but there is no guidance as to where to plugin the output from the current sensor or how to configure the CLI options for current sensing.

Can someone point me to the documentation please?

crazyal
Posts: 84
Joined: Tue Sep 04, 2012 11:25 pm

Re: Baseflight aka multiwii port to stm32

Post by crazyal »

that's all there is so far:
https://github.com/multiwii/baseflight/ ... -Variables
power_adc_channel is the var to set in cli for the POWERMETER feature

bajacondor
Posts: 13
Joined: Sun May 11, 2014 10:18 pm

Re: Baseflight aka multiwii port to stm32

Post by bajacondor »

I finally managed to make a build of the current source from git using Sourcery GCC EABI and Eclipse in Windows 8. The hex file came out at 234 kb. What's the limit? I see that the compiled binary from git is 167. I'm sure using a different compiler caused a bit of variance in size, but that seems excessive. Anyone able to confirm this size? Maybe I screwed something up. It's my first attempt at a cross-compile

Thanks

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

GCC sucks, in general.
codesourcery fork much more.
you should be using https://launchpad.net/gcc-arm-embedded

bajacondor
Posts: 13
Joined: Sun May 11, 2014 10:18 pm

Re: Baseflight aka multiwii port to stm32

Post by bajacondor »

What is the firmware size limit for the Naze32?

bajacondor
Posts: 13
Joined: Sun May 11, 2014 10:18 pm

Re: Baseflight aka multiwii port to stm32

Post by bajacondor »

Built with the gcc-arm-none-eabi-4_8-2014q2 from lauchpad.net, on a Debian virtual machine the hex comes out to 220kb. Does anyone care?

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

what matters is stuff reported by arm-none-eabi-size, which will be the final firmware size... (include rodata and code).
But no, generally noone cares, people who are developing firmware will either use a proper compiler or deal with gcc failing.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

I just had a flyaway. It went down 1km away and was lucky to find the quad. Thanks to the GPS and telemetry on Taranis!

Did an update to latest fw right before the flyaway today. Did a restore from backup and dump.

I was messing with a new GPS and PH. I know what you think about PH :) But at the time of the flyaway i do not believe i had it in PH. Trying RTL did nothing. But i can not be certain as it all went too quickly to think about it. Declination is correct.

Thinking about it i was also experimenting with loop time at 2500.

This is what I get messing about :-/

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Patches to make GPS actually work are welcome.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

Removed dual post.

Tapatalk timed out on first post.
Last edited by strips on Tue Jul 08, 2014 12:57 am, edited 1 time in total.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Pretty sure everyone read your post the first time you posted it.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Sv: Baseflight aka multiwii port to stm32

Post by e_lm_70 »

strips wrote:I just had a flyaway. It went down 1km away and was lucky to find the quad. Thanks to the GPS and telemetry on Taranis!

Did an update to latest fw right before the flyaway today. Did a restore from backup and dump.

I was messing with a new GPS and PH. I know what you think about PH :) But at the time of the flyaway i do not believe i had it in PH. Trying RTL did nothing. But i can not be certain as it all went too quickly to think about it. Declination is correct.

Thinking about it i was also experimenting with loop time at 2500.

This is what I get messing about :-/


If the mag calibration was not done, or was not accurate ... you will always get a fly away

After a new flash is mandatory to recalibrate acc and mag again

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

e_lm_70 wrote:
strips wrote:I just had a flyaway. It went down 1km away and was lucky to find the quad. Thanks to the GPS and telemetry on Taranis!

Did an update to latest fw right before the flyaway today. Did a restore from backup and dump.

I was messing with a new GPS and PH. I know what you think about PH :) But at the time of the flyaway i do not believe i had it in PH. Trying RTL did nothing. But i can not be certain as it all went too quickly to think about it. Declination is correct.

Thinking about it i was also experimenting with loop time at 2500.

This is what I get messing about :-/


If the mag calibration was not done, or was not accurate ... you will always get a fly away

After a new flash is mandatory to recalibrate acc and mag again

That might be adding to it. I did a mag calib but only a hasty one indoors. The flyaway was at end of battery. I was thinking about landing when it happened. I had tested PH a few minutes before and that resulted in a toilet bowl circle.

I still believe i was not in PH when it flew off. It also seemed it did not respond to my controls. But it went over my head and I lost LOS when it passed just over my house. Just wish I had filmed it.

norem
Posts: 2
Joined: Tue Jul 01, 2014 6:46 am

Re: Baseflight aka multiwii port to stm32

Post by norem »

Out of curiosity do you recall which direction it ranaway ? north south west east ?

Post Reply