Baseflight aka multiwii port to stm32

User avatar
polo_fly2
Posts: 34
Joined: Fri Aug 05, 2011 1:12 pm
Location: Munich - Bavaria

Re: Baseflight aka multiwii port to stm32

Post by polo_fly2 »

Hi,
I have flashed the dev-r363 to my acro-naze, just see what will happen . My tri flies superb with. A big positive change in behavior compared to the release r304 which I had before.
Very stable even in turbulent air. If like you can see a short video with unprofessionally taped camera on it during flight.

http://vimeo.com/71249127

Thank you for the nice Firmware :-)
Georg

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Baseflight aka multiwii port to stm32

Post by jingej »

mr.sneezy wrote:Thanks TC. That partly explains the weird compass stuff, maybe all of it.

OK, I have done the Acc/Gyro reorientation. This image shows the new Acc and Gyro axis settings, might help somebody sometime. Numerically it makes little sense, but on the GUI all is now well, including the compass. Time to fly...

i turned my board 90° CW and i tried several hours to find out the correct values for the MAG... gyro and acc were easy, but mag was a horror... so its not the values you need (180°) but it may give you an idea of the mag-values...

set align_gyro_x = -2
set align_gyro_y = 1
set align_gyro_z = -3
set align_acc_x = -1
set align_acc_y = -2
set align_acc_z = 3
set align_mag_x = -1
set align_mag_y = -3
set align_mag_z = -2

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

Thanks, I got it sorted and I posted a screen image of the values that worked. In the end I turned the module so the mag direction is the same as TC uses and then changed the acc/gyro axis orientations.

Martin
PS. The new sensor board seems to fly well.

jingej wrote:
mr.sneezy wrote:Thanks TC. That partly explains the weird compass stuff, maybe all of it.

OK, I have done the Acc/Gyro reorientation. This image shows the new Acc and Gyro axis settings, might help somebody sometime. Numerically it makes little sense, but on the GUI all is now well, including the compass. Time to fly...

i turned my board 90° CW and i tried several hours to find out the correct values for the MAG... gyro and acc were easy, but mag was a horror... so its not the values you need (180°) but it may give you an idea of the mag-values...

set align_gyro_x = -2
set align_gyro_y = 1
set align_gyro_z = -3
set align_acc_x = -1
set align_acc_y = -2
set align_acc_z = 3
set align_mag_x = -1
set align_mag_y = -3
set align_mag_z = -2

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

Why is the cycle time of the precompiled 19.2.2013 baseflight around 1.6ms and the self compiled is around 3.6ms ?
Missing compiler optimization, or are the versions so different?

Can i ask subversion to give me the 19.2.2013 source?

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

loop time is configurable, set looptime=???
default around early this year was set to 3500

User avatar
IceWind
Posts: 115
Joined: Fri Mar 25, 2011 2:11 am
Contact:

Re: Baseflight aka multiwii port to stm32

Post by IceWind »

Any plans to change the PID calculations to be time aware?
(Just curiosity, I have no problems with my Naze32 it fly wonders...)

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

pfft, might as well just rewrite whole thing with proper pid then?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

First test flight -> sliced up my finger due to my own stupidity. Failsave not enabled, badly soldered RX cable.

Second test flight -> wonderful. Simply wonderful. This little 23cm quad was never so quiet, wobble free but stable, nearly drift free and easily manageable. Wow. This board / soft is good. TY TC.

kol
Posts: 5
Joined: Fri Jan 04, 2013 6:11 am

Post by kol »

Hi. I tried to test GPS PosHold, but when i turned on this feature copter immediately lost his position and flew to the side.

Have someone working PosHold and RTL on baseflight firmware?

subaru4wd
Posts: 316
Joined: Sat Dec 08, 2012 2:16 am

Re:

Post by subaru4wd »

kol wrote:Hi. I tried to test GPS PosHold, but when i turned on this feature copter immediately lost his position and flew to the side.

Have someone working PosHold and RTL on baseflight firmware?


If you want GPS features, its probably best to try out Harakiri and forget about baseflight.

Timecop has made it clear he is not interested in GPS features, so do not expect much help from him on the subject.

Harakiri: viewtopic.php?f=23&t=3524

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

Re:

Post by timecop »

kol wrote:Hi. I tried to test GPS PosHold, but when i turned on this feature copter immediately lost his position and flew to the side.
Have someone working PosHold and RTL on baseflight firmware?


It works if you know what you're doing.
If you DON'T know what you're doing, I suggest DJI A2M.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hi Timecop!
There popped up a question concerning 433Mhz devices and the 6th harmonic of 72Mhz based FC like yours, based on that observation: http://fpvlab.com/forums/showthread.php ... post273505
I know by that post that you already have been contacted and your standpoint seems to be clear on this. Since I have no freq. scanner or 433Mhz devices I can not comment on those findings. Later on in this thread "chatch" seems to OC the STM to 80Mhz to "resolve" that. My question is: Can this be done so easily? What about the other timings in the code?

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

They just continue working.
I did the chatchpatch and tested it, and found a bug which assumed 72mhz speed in some part of the code, otherwise worked fine.

Farmer_joe
Posts: 7
Joined: Tue Dec 20, 2011 8:37 pm

Re: Baseflight aka multiwii port to stm32

Post by Farmer_joe »

Ok im flying fpv with 433 radio... Is ti safe to use that patch (80Mhz) or not.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

It's just one line change in drv_system, right? I'd suggest rebuilding latest sources tho...

Farmer_joe
Posts: 7
Joined: Tue Dec 20, 2011 8:37 pm

Re: Baseflight aka multiwii port to stm32

Post by Farmer_joe »

Ok, i know im a noob when it comes to programing and code... But i have the RF explorer and will measure my naze32 today.

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

There is ZERO influence of the stm32 on 432 mhz (6*72 = 432). A receiver on 433.xxx wont be disturbed in any way.

Attached scan is 431 to 437 mhz with the PC OFF. The PC makes a solid S9+20 on 432mhz, the stm32 does not. So, if you scan, switch your PersonalComputer off.
Attachments
DSC_0116.jpg
Last edited by Plüschi on Sun Sep 15, 2013 5:57 pm, edited 1 time in total.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Plüschie: Thank you very much for taking the time and having the equipment to check that! Don't know what the "yaesu" numbers mean, but good to know.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

The bar on the bottom below the numbers that shows "used" spectrum is flat.
I do have a spectrum analyzer and I do remember NAZA causing a shitton of noise at 72MHz (lol), but I did run the same em testing probe near esc32s on same frame and didn't see anything. I didn't bother testing w/afro32 but some dudes posted stuff on fpvlab, and rebuilding with pll at 80mhz DID fix the harmonic they were seeing.

JUERGEN_
Posts: 70
Joined: Sat Sep 08, 2012 9:12 am

Re: Baseflight aka multiwii port to stm32

Post by JUERGEN_ »

Plüschi wrote:There is ZERO influence of the stm32 on 432 mhz (6*72 = 432). A receiver on 433.xxx wont be disturbed in any way.
....

a bare PCB,

Image

without wiring,
says nothing. :roll:

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

I did repeat the measurement with two 16cm wires attached to different pins of the mini-board. No change.

Then i did test my bigger chinese stm32 board. Holy guano. Same thing as the fpvlabs guys got. A really strong signal on the 3.3V rail. S9+. This will deafen a nearby "not so good" receiver. High inductance filter cap on 3.3V, or cap too far from stm32 i suspect.

So this IS an issue on certain boards. A hardware issue :)
Attachments
DSC_0119.jpg

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

I can definitely confirm my hardware spewing out garbage at 432MHz, which goes away when run at 80MHz
http://imgur.com/anqGn9Z,0DTYKPQ

Out of curiosity, check the console on the other board that wasn't spewing shit, and see if its actually running at 72MHz? cli->"status". Should say what MHz it's at.

Peak #2 in my pic is something else - I have a fairly strong carrier there for some reason. No idea what it is.

Also, the probe is going through an amp - so actual amplitude is -79dBm, which gets amped to -59dBm.

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

# status
System Uptime: 83 seconds, Voltage: 0 * 0.1V (3S battery)
CPU 72MHz, detected sensors: ACC ACCHW: MPU6050.n
Cycle Time: 3506, I2C Errors: 0, config size: 800


Edit: damm i did manage to damage the board with reverse polarity :((
Last edited by Plüschi on Tue Sep 17, 2013 3:14 pm, edited 1 time in total.

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

Changes i made to imu.c:

----------

Code: Select all

void computeIMU(void)
{
    uint32_t axis;
    static int16_t gyroYawSmooth = 0;

    ACC_getADC();
    Gyro_getADC();
    getEstimatedAttitude();

    annexCode();

    for (axis = 0; axis < 3; axis++)
        gyroData[axis] = gyroADC[axis];

    if (mcfg.mixerConfiguration == MULTITYPE_TRI) {
        gyroData[YAW] = (gyroYawSmooth * 2 + gyroData[YAW]) / 3;
        gyroYawSmooth = gyroData[YAW];
    }
}


The whole double-read and averageing makes no sense with modern sensors.
----------

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

Here a patch making the serialrx call sequence nicer:

http://bcas.tv/paste/results/Lf3QLL43.html

It does run the RC code when there is new serial data, and not in a fixed 20ms interval.

There is 1 problem, failsave counter becomes dependant on rc-rate. SpekSat with 11ms timing will work out failsafe much faster that 22ms SpekSat. No nice (beautiful) solution yet ...

Edit:
No failsafe problems with speksat, since they dont deliver any data if they dont receive any. So failsafe defaults to 20ms.
Sbus is differnet ...

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Hi. Please could someone be so kind and tell me how to insert magnetic declination. I know how in CLI...but dunno like in multiwii for example: 1,89f or just 189?

And for uBlox GPS...is this ok: set gps_type=2 or 1?

And what is morron_treshold?

Thanks!

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

I would suggest you actually get things FLYING before doing any of that junk, but

things to read:
https://code.google.com/p/afrodevices/w ... tVariables
and,
for mag stuff,
"For example, -6deg 37min, = -637 Japan, format is [sign]dddmm (degreesminutes) default is zero."

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Ok...so if 1deg 5min = 105?

And thanks forCLI variables.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Yes.

kol
Posts: 5
Joined: Fri Jan 04, 2013 6:11 am

Re: Baseflight aka multiwii port to stm32

Post by kol »

Hi, Timecop! In last version of baseflight (r429) my ublox 6m gps module is not recognized. On previous versions (r363), it was in status output.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Don't know, don't care.
GPS needs complete rework, there are higher priority things to fix first.

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Question about looptime. Can I set looptime to 2800 or even lower and what would be benefit here? And I have F30A with simonk FW. I read in CLIVariables that BF is set to 400Hz PWM output. Can I set it to 495Hz?

Thanks for answer.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Why don't you try reading the manual and shit for once? cli has error checking, if you set stuff to invalid value it;'ll tell you.
It would take all of 5 seconds to find out that max PWM freq is 498Hz, in steps of 1Hz. So you can set it to any number between 50 and 498.

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Thanks. I've read the manual and shit :). I just wanted to know if I'll gain something with higher frequency PWM and lowering looptime. ;)

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baseflight aka multiwii port to stm32

Post by Plüschi »

Scrat, if there was any benefit of other looptimes or other pwm freq's, dont you think this would be default value?

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Plüschi wrote:Scrat, if there was any benefit of other looptimes or other pwm freq's, dont you think this would be default value?


Just wanted to know from experts. Sorry for asking.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Baseflight aka multiwii port to stm32

Post by jingej »

Hi,

is it possible to activate the one-pulse mode output of the STM ?

thanks

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

What the heck is it?
EDIT: found.
Useless shit that isn't necessary.
So, no need to activate.
Thanks.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Baseflight aka multiwii port to stm32

Post by jingej »

thanks for the answer, i feel better now...

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Log message

Beginning of the great GPS unfucking.
* Proper initialization sequence framework for various supported GPS types. NMEA
will now auto-detect its baud rate based on received frames.
* As a result of the above, gps_baudrate has been changed to enum, to only allow
fixed rates. (GPS baudrate, -1: autodetect (NMEA only), 0: 115200, 1: 57600, 2:
38400, 3: 19200, 4: 9600)
* UBX binary initialization at any specified baudrate with auto-reconnect on
signal loss.
* GPS thread to handle initialization, signal loss and configuration. No longer
does GPS need to be powered before FC, and on GPS reconnect, it will be re-
initialized if needed.
MTK NMEA/binary initialization is omitted for now, as I can't find my MTK GPS
GPS deltaTime can be calculated to display update rate.


:)

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

I didn't check this...but can we set alt_hold_fast_change = 1 in CLI? Is this the same as in multiwii. If 0 then smooth alt change routine is activated?

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Setting up GCC to work from Keil MDK

Post by aBUGSworstnightmare »

Hi,

I've just installed the free 32kB Version of Keil MDK and GNU Tools for ARM Embedded Processors (Version 4.7-2013-q3-update) but I fail to change the project settings to make basflight compile under this environment.

My settings are as shown below. Any advice is welcome!

Rgds
aBUGSworstnightmare

Use GCC instead of Keil compiler
Use GCC instead of Keil compiler


Under OPTIONS FOR TARGET 'STM32' I've made the following changes:

Enable .HEX-File generation
Enable .HEX-File generation


Change the OBJ folder to the correct one
Change the OBJ folder to the correct one


On the CC-tab if added the symbols
STM32F10X_MD,USE_STDPERIPH_DRIVER

and the include files were
.\lib\CMSIS\CM3\CoreSupport;.\lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x;.\lib\STM32F10x_StdPeriph_Driver\inc

COMPILE THUMB CODE is checked.

Tab CC settings
Tab CC settings


The INCLUDE PATH SETTINGS for the assembler are the same as for the linker

Assembler Tab settings
Assembler Tab settings


The settings on the LINKER-tab are as shown below:

Linker Tab settings - change this to file stm32_flash_gcc.ld
Linker Tab settings - change this to file stm32_flash_gcc.ld


When BUILDING the project it starts compiling but then the toolchain throws tons of errors.
So, what I'm I missing here; what's going wrong?

Errors
Errors
Last edited by aBUGSworstnightmare on Sun Oct 20, 2013 10:21 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 »

Use the _gcc startup file.

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: Baseflight aka multiwii port to stm32

Post by aBUGSworstnightmare »

Hi Timecop,

still no luck! I've removed the two startup files from the project and added 'startup_stm32f10x_md.s' from 'lib\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7' but I still get errors from the linker.

errors after changing startup file
errors after changing startup file


Do I need to specify values on the linker tab for TEXT START/DATA START/BSS START or what could be/is the problem?

Rgds
Joerg
aBUGSworstnightmare

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

_gcc startup file is provided for a reason, the startup is customized to allow bootloader jump on 'R'.
So there's no reason to replace it with another one. Yes, you will probably need a linker script - the one provided for Makefile build is probably a good start. Looks like you at least got it building, thats further than I ever got with keil + gcc.

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: Baseflight aka multiwii port to stm32

Post by aBUGSworstnightmare »

Hi Timecop,

seems like I finally did it 8-) after some hours of 'digging in the mudd'

I needed to define two new symbols, changed the _gcc startup code (as detailed here viewtopic.php?f=23&t=3524&start=330#p42436 ; sry for mixing topics!) and now I can successfully compile the baseflight sources with GCC under Keil MDK!!

1.) I've modified the 'startup_stm32f10x_md_gcc.s'

2.) Wrote a new linker script file 'stm32_flash_gcc.ld'

3.) I've added the lines below to main.c

Code: Select all

// aBUGSworstnightmare; changed on 10/20/2013
// Definition of __errno and _exit were needed to make it link under Keil + GCC
// NOT FLIGHT TESTED!!!!
static int errno;

int *__errno(void) { return &errno; }

void _exit(void) {
    while(1) {
        // Loop until reset
    }
}

// END OF GCC SYMBOLS


4.) Compiled the code

aBUGSworstnightmare @ Keil + GCC = success!
aBUGSworstnightmare @ Keil + GCC = success!


5.) Downloaded the .hex file to a Rev4 Naze and tested it with Baseflight GUI

Provided .hex file tested with Baseflight GUI
Provided .hex file tested with Baseflight GUI


I've attached the .hex file, the modified 'startup_stm32f10x_md_gcc.s' and the new linker script file 'stm32_flash_gcc.ld' for your reference/testing.
Would be fine if you - or anybody else from the community - could confirm the functionality of the GCC + Keil development environment.

Rgds
aBUGSworstnightmare
Attachments
stm32_flash_gcc.ld.zip
Linker script file for use with GCC under Keil hood
(1.69 KiB) Downloaded 112 times
baseflight_gcc-generated.zip
.Hex file generated with GCC
(112.75 KiB) Downloaded 108 times
startup_stm32f10x_md_gcc.s.zip
Modified startup file for GCC
(3.77 KiB) Downloaded 101 times

teslahed
Posts: 84
Joined: Wed Jun 27, 2012 2:51 pm

Re: Baseflight aka multiwii port to stm32

Post by teslahed »

timecop wrote:It would take all of 5 seconds to find out that max PWM freq is 498Hz, in steps of 1Hz. So you can set it to any number between 50 and 498.


If i am using the new AfroESCs (12 amp version) that have an input frequency of up to 1khz, will i see any improvement if i set my motor_pwm_rate = 498 from 400? Will the motors / ESCs react slightly quicker? I will test this tomorrow.

I am also interested to know why looptime is set to 3500 - that seems quite high. My basic crius all in one pro running regular multiwii has a loop time of about 3000 (unfixed of course). Without really understanding the details i would have thought faster = better. I will leave this value alone until i understand it more.

Plüschi wrote:Scrat, if there was any benefit of other looptimes or other pwm freq's, dont you think this would be default value?


If you can shed any light on this i'm all ears :)

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

Re: Baseflight aka multiwii port to stm32

Post by scrat »

I have set pwm freq's to 450Hz. It's working better for me. I have all esc's flashed with simonk FW. And looptime...i have it set to 2900.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

scrat wrote:I have set pwm freq's to 450Hz. It's working better for me. I have all esc's flashed with simonk FW. And looptime...i have it set to 2900.


1/0,0029 = 344,82Hz
normaly 400Hz for esc will be fine and you see a difference with 450Hz ? correct me if i am wrong ?

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: Baseflight aka multiwii port to stm32

Post by aBUGSworstnightmare »

Hi Timecop,

still figuring out if the Keil+GCC IDE is full operable.

I found something in your stm32_flash.ld linker script file which is not clear to me:

Code: Select all

  /* Initialized data sections goes into RAM, load LMA copy after code */
  .data :
  {
    . = ALIGN(4);
    _sdata = .;        /* create a global symbol at data start */
    *(.data)           /* .data sections */
    *(.data*)          /* .data* sections */

    . = ALIGN(4);
    _edata = .;        /* define a global symbol at data end */
  } >RAM AT> FLASH


What is this command '>RAM AT> FLASH' used for? Shouldn't the initialized data section be in RAM (>RAM)? Would be fine if you could provide some details!

I've attached a .map file (build this morning) for your reference. I need to make a pull of the latest Baseflight Sources this evening and compare your .map file (pure Keil IDE) against mine (Keil IDE + GCC).
Rgds
aBUGSworstnightmare
Attachments
baseflight.map.zip
Map file - Keil+GCC Basflight r443
(20.83 KiB) Downloaded 113 times

Post Reply