Not enough space to flash the image file??

Discussions about all things Bitcraze
Post Reply
Manakoy
Beginner
Posts: 1
Joined: Fri Aug 30, 2019 2:58 am

Not enough space to flash the image file??

Post by Manakoy » Fri Aug 30, 2019 3:16 am

I followed the steps of the websitehttps://docs.px4.io/master/en/complete_ ... flie2.html recently. I hope to connect crazyflie2 to QGC. I followed his steps but I failed. My crazyflie2 is flash with firmware provided by PX4. When I want to re-flash my original firmware for my crazyflie2, I get the following error.

Code: Select all

fyh@A:~/crazyswarm/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: 0 | Page size: 0 | Buffer pages: 0 | Start page: 0
0 KBytes of flash available for firmware image.

Flashing 1 of 1 to stm32 (fw): Error: Not enough space to flash the image file.
Traceback (most recent call last):
  File "/home/fyh/crazyswarm/crazyflie-clients-python/src/cfloader/__init__.py", line 179, in main
    bl.flash(filename, targetnames)
  File "/home/fyh/.local/lib/python3.6/site-packages/cflib/bootloader/__init__.py", line 208, in flash
    self._internal_flash(target, file_counter, len(files_to_flash))
  File "/home/fyh/.local/lib/python3.6/site-packages/cflib/bootloader/__init__.py", line 285, in _internal_flash
    raise Exception()
Exception
I also tried using cfclient to refresh the firmware for my cf2 but I still get an error.
Image
Attachments
2019-08-30 11-15-23屏幕截图.png



arnaud
Bitcraze
Posts: 2046
Joined: Tue Feb 06, 2007 12:36 pm

Re: Not enough space to flash the image file??

Post by arnaud » Fri Aug 30, 2019 7:17 am

Hi,
The error comes from the fact that your STM32 bootloader reports 0 bytes of flash:

Code: Select all

Target info: stm32 (0xFF)
Flash pages: 0 | Page size: 0 | Buffer pages: 0 | Start page: 0
0 KBytes of flash available for firmware image.
This should not happen unless the bootloader has been modified. Did you flash a new bootloader when trying PX4?

You can re-flash the STM32 bootloader using the USB DFU mode following these instruction: viewtopic.php?f=5&t=3225&p=15771&hilit= ... der#p15771.

Post Reply