Why is Arduino / Nucleo F103RB Losing Code Space?
I have been using the Arduino 1.8.9 app for several months programming the Nucleo-F103RB development board with my application. I have several boards and some are self powered and others USB powered. Yesterday, on a self-powered board, I received a message "No space left on device" below.
cp: /Volumes/NODE_F103RB/Project.ino.bin: No space left on device
copying /var/folders/44/m8hjkbb500g80c81hqx5tqlc0000gp/T/arduino_build_48675/Project.ino.bin to /Volumes/NODE_F103RB
In Mac OS, it is showing the "disk" size is only 33kB instead of the normal 160kB. I tried power cycling, moving back to USB powered, removing all files (with only added up to 32kB reported in OS) and even erasing the chip with ST-Link Utility. The same message appeared. I finally programmed a 'somewhat' blank project with System Workbench which worked fine. Power cycling the device showed the full disk size back to 160kB. I switched from the onboard ST-Link (with jumpers) and back to self-powered. I programmed the device several times today and now again, I get the same out of space message.
Any idea why this happening and what is causing this behavior? Is there a way to prevent from losing disk size for the copy? Where is the space going? Is how the device powered impacting it? What would make it start happening now? I have been optimizing my program the last week to be smaller so it shouldn't be some code size limit. Though the version of Arduino hasn't changed in my development time, could there be something it is breaking related to size?
For those wondering, I am using the Arduino toolset because after a week of troubleshooting, I still couldn't get I2C working in System Workbench. It just worked in Arduino.