Problem with change of the controller in the firmware

Firmware/software/electronics/mechanics
Post Reply
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Problem with change of the controller in the firmware

Post by EduardoAguilar »

Hi Kristoffer, thanks for your answer

I follow all the steps that you told me, let me show you my terminal

Code: Select all

eduardo@eduardo-Aspire-V3-574:~/crazyflie-firmware$ make clean
  CLEAN
eduardo@eduardo-Aspire-V3-574:~/crazyflie-firmware$ make PLATFORM=cf2
.
.
.
 AS    startup_stm32f40xx.o
  CC    system_stm32f4xx.o
  LD    cf2.elf
  COPY  cf2.hex
  COPY  cf2.bin
  DFUse cf2.dfu
rm version.c
Build for the CF2 platform!
Build 34:e109c8916dc6 (2020.09 +34) MODIFIED
Version extracted from git
Crazyloader build!
Flash |  379564/1032192 (37%),  652628 free | text: 373124, data: 6440, ccmdata: 0
RAM   |   65712/131072  (50%),   65360 free | bss: 59272, data: 6440
CCM   |   63264/65536   (97%),    2272 free | ccmbss: 63264, ccmdata: 0
eduardo@eduardo-Aspire-V3-574:~/crazyflie-firmware$ make
  CLEAN_VERSION
  VTMPL version.c
  CC    version.o
  LD    cf2.elf
  COPY  cf2.hex
  COPY  cf2.bin
  DFUse cf2.dfu
Build for the CF2 platform!
Build 34:e109c8916dc6 (2020.09 +34) MODIFIED
Version extracted from git
Crazyloader build!
Flash |  379564/1032192 (37%),  652628 free | text: 373124, data: 6440, ccmdata: 0
RAM   |   65712/131072  (50%),   65360 free | bss: 59272, data: 6440
CCM   |   63264/65536   (97%),    2272 free | ccmbss: 63264, ccmdata: 0

eduardo@eduardo-Aspire-V3-574:~/crazyflie-firmware$ make cload
python3 -m cfloader  flash  cf2.bin stm32-fw
Restart the Crazyflie you want to bootload in the next
 10 seconds ...
 done!
Connected to bootloader on Crazyflie 2.0 (version=0x10)
Target info: nrf51 (0xFE)
Flash pages: 232 | Page size: 1024 | Buffer pages: 1 | Start page: 88
144 KBytes of flash available for firmware image.
Target info: stm32 (0xFF)
Flash pages: 1024 | Page size: 1024 | Buffer pages: 10 | Start page: 16
1008 KBytes of flash available for firmware image.

Flashing 1 of 1 to stm32 (fw): 379971 bytes (372 pages) ..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..........10..2
Reset in firmware mode ...
and my config.mk is (https://www.bitcraze.io/documentation/r ... ure_build/)

Code: Select all

PLATFORM=CF2
DEBUG=1

and in the terminal

Code: Select all

eduardo@eduardo-Aspire-V3-574:~/crazyflie-firmware$ make DEGUB=1
  CLEAN_VERSION
  VTMPL version.c
  CC    version.o
  LD    cf2.elf
  COPY  cf2.hex
  COPY  cf2.bin
  DFUse cf2.dfu
Build for the CF2 platform!
Build 34:e109c8916dc6 (2020.09 +34) MODIFIED
Version extracted from git
Crazyloader build!
Flash |  379564/1032192 (37%),  652628 free | text: 373124, data: 6440, ccmdata: 0
RAM   |   65712/131072  (50%),   65360 free | bss: 59272, data: 6440
CCM   |   63264/65536   (97%),    2272 free | ccmbss: 63264, ccmdata: 0




i have the same problem, the CONTROLLER:PID,
even when i use python and select another controller the crazyflie in the terminal say CONTROLLER:PID.


viewtopic.php?p=20557#p20557

If you can help me I would appreciate it thank you.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Problem with change of the controller in the firmware

Post by kimberly »

Hi!

The documentation says you have to use the is equal sign ( = )

Code: Select all

CONTROLLER=Mellinger
(Also if you change the controller through the pythonscript or cfclient, the terminal is not supposed to say anything. Just dubble check the parameter value then.)
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Re: Problem with change of the controller in the firmware

Post by EduardoAguilar »

Hi Kimberly!!



Thanks for the answer,
The documentation says you have to use the is equal sign ( = )
and yes I tray in my Makefile i have CONTROLLER=Eduardo or CONTROLLER=Mellinger, depent the controller that i want to use,
but the controller can't change.

(Also if you change the controller through the pythonscript or cfclient, the terminal is not supposed to say anything. Just dubble check the parameter value then.)
well sounds more easy in python script, i will tray change the controller in python.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Problem with change of the controller in the firmware

Post by kimberly »

I tried it myself on my crazyflie and I don't see a problem with the latest firmware. I build it like this:

Code: Select all

make clean && make CONTROLLER=Mellinger
Then I verify this in the cfclient:
Screenshot from 2020-10-23 09-45-37.png
Here I see that stabilizer.controller is set on 2, which is the number that corresponds for Mellinger. If I make the firmware with CONTROLLER=PID this goes back to 1
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Re: Problem with change of the controller in the firmware

Post by EduardoAguilar »

Hi kimberly!!

Thank you so much for your help!!!
best regards.
Post Reply