2015-07-18 05:39 PM
Hi,
I am using a DISCOF4 with the USB library with great success if the code size is bellow 17356 bytes. More than 17352 bytes and the USB library is crashing (unknown device in the device manager)! Is there something I am missing? I don't know what to do... Thank you in advance for your help Info taken from the .map file :Everything is working : ============================================================================== Code (inc. data) RO Data RW Data ZI Data Debug 17352 918 472 472 50576 485554 Grand Totals 17352 918 472 208 50576 485554 ELF Image Totals (compressed) 17352 918 472 208 0 0 ROM Totals ============================================================================== Total RO Size (Code + RO Data) 17824 ( 17.41kB) Total RW Size (RW Data + ZI Data) 51048 ( 49.85kB) Total ROM Size (Code + RO Data + RW Data) 18032 ( 17.61kB) ==============================================================================USB is not working : ============================================================================== Code (inc. data) RO Data RW Data ZI Data Debug 17356 918 472 472 50576 485558 Grand Totals 17356 918 472 208 50576 485558 ELF Image Totals (compressed) 17356 918 472 208 0 0 ROM Totals ============================================================================== Total RO Size (Code + RO Data) 17828 ( 17.41kB) Total RW Size (RW Data + ZI Data) 51048 ( 49.85kB) Total ROM Size (Code + RO Data + RW Data) 18036 ( 17.61kB) ============================================================================== #stm32 #device #discovery #usb2015-07-19 05:28 AM
The part has 1MB of FLASH.
The issue here is something in the code you're running, that's creating a dependency. You should probably make sure you've allocated sufficient space for the stack, and check that you don't call out any specific addresses. The stack would be in startup_stm32f4xx.s, probably something like 0x400, try 0x2000