2018-05-10 07:32 AM
Hi.
I'm trying to upgrade an existing PCB (so changing the MCU is not an option for now).
The MCU used so far is the STM32f070F6. The MCU has USB peripheral and I want to use this as VCOM.
When I generate the code with CubeMX and try to compile (with absolutely no code change), I get the message that the MCU do not have enough RAM: '/arm-none-eabi/bin/ld.exe: region` RAM 'overflowed by 1760 bytes'.
I have already changed the CDC buffers to a size of 40 bytes (maximum of what I want to transfer), but I still have a similar error.
Is there an example with this MCU in which the USB peripheral is used?
Thank you.
#cubemx #usbvcom #stm32f070f6 #stm32f0702018-05-10 08:54 AM
Hi David,
There is an application under the
package. It's titled 'CDC_Standalone' and could be found following the path below:STM32Cube_FW_F0_V1.9.0\Projects\STM32072B_EVAL\Applications\USB_Device\CDC_Standalone
The example may help you to correctly configure your application. It shows how to use the STM32F0xx USB Device peripheral where the STM32 MCU behaves as a USB-to-RS232 bridge following the Virtual COM Port (VCP) implementation.
Khouloud.
2018-05-11 09:52 AM
Thank you
garsi.khouloud
I'm following this example, but the problem is that I can not compile at all.
I still have RAM overflow.
The project is here (
https://mega.nz/#F!ke5S0JoJ!tJqNLGDPO_OMfP3whwUPrg
).As you can see, there is no modified code. It's a clean project, but apparently there is not enough RAM ...
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T'../STM32F070F6Px_FLASH.ld' -Wl,-Map=output.map -Wl,--gc-sections -o 'stm_vcom.elf' @'objects.list' -lm
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: stm_vcom.elf section`.bss' will not fit in region `RAM' c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe:region `RAM' overflowed by 1632 bytes collect2.exe: error: ld returned 1 exit status make: *** [stm_vcom.elf] Error 1 makefile:37: recipe for target 'stm_vcom.elf' failedCan you confirm, please?
Thank you.
2018-05-11 10:35 AM
Examine the mapfile to find out where did the memory go.
JW
2018-05-14 05:20 AM
Is much RAM being spent on RX and TX buffers?
Am I parsing correctly?
2018-05-14 06:43 AM
From *.map file:
0x1000 = 4096 bytes
From 'usbd_cdc_if.c':
https://s7.postimg.cc/7n6ybk8bf/Capturar.png
But in the configurator I wrote 64 bytes to the RX and TX buffer.
Could it be a CubeMX bug?
2018-05-14 06:49 AM
Now I can compile the code, but my windows PC still does not detect the device, as USB COM port.
This is my circuit and I think everything is correct to work ...
Could it be a Drivers problem?
2018-05-16 03:54 AM
This forum is being watched?
Any news? Some help?
2018-05-16 05:55 AM
Hi Martin,
Now I can compile the code,
-> Could you please share the encountered issue and the solution. This will be helpful for other STM32 MCUs users who are facing the same issue.
Khouloud.
2018-05-16 06:10 AM
garsi.khouloud
,I already explained how I managed to compile. Did you see this post?
https://community.st.com/0D50X00009XkeFHSAZ
Change the APP_RX_DATA_SIZE and the APP_TX_DATA_SIZE to 64 solve the problem.
Can you confirm that it is
a CubeMX bug?
This is the circuit I have on my PCB:
https://community.st.com/0D50X00009XkeFHSAZ
All power comes from USB (J2 - is the USB connector).