Sysprogs forums › Forums › VisualGDB › Target MCU definition
Tagged: target MCU selection
- This topic has 9 replies, 2 voices, and was last updated 8 years, 7 months ago by support.
-
AuthorPosts
-
March 17, 2016 at 10:56 #7790karlis77Participant
Hello all.
When I make a new VisualGDB project, for example, with STM32F051R8 then in the STM32f0xx.h file it shows that the chosen MCU is STM32F051R8 and there are no problems regarding that.
But when I make project with STM32F030CC then STM32f0xx.h shows that STM32F030 is chosen.
In both cases in proprocessor macros there is only DEBUG, but I guess that shouldn’t be the problem, because in case of STM32F051R8 everything works fine.
Also when I make the project I choose the right MCU so there is no mistake in that part too.
Why this happens? Where in the project can I define which MCU I am using?
Please help.
March 17, 2016 at 23:41 #7798supportKeymasterHi,
The macros that VisualGDB sets for different devices are defined in %LOCALAPPDATA%\VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32\BSP.XML .
We have just checked the one for STM32F030CC and it seems to be defined correctly (see stm32.mak):
PREPROCESSOR_MACROS += ARM_MATH_CM0 STM32F030CC stm32_flash_layout STM32F030xC
Could you double-check that you are using the latest BSP v3.5? Does the same problem happen when you create a new project? If yes, could you share the PREPROCESSOR_MACROS line from your stm32.mak?
March 18, 2016 at 07:47 #7804karlis77Participant<h5>I checked the stm32.mak file and it differs from the line you wrote. Here is mine:
PREPROCESSOR_MACROS += ARM_MATH_CM0 STM32F030CC stm32_flash_layout STM32F030</h5>
<h5>
If I change the STM32F030 to STM32F030CC in the end of line it still does not work.</h5>
I guess I am using BSP version 3.3, because this is what I found in BSP file.
<PackageVersion>3.3</PackageVersion>Yes, this same problem happens when I create a new project with this model. It does not happen when I choose STM32F051R8 for example.
- This reply was modified 8 years, 8 months ago by karlis77.
March 18, 2016 at 08:25 #7806karlis77ParticipantBTW, I just updated my Visual GDB, but it did not update the BSP. It is still version 3.3, and when I choose STM32F030CC for new project, there still is a STM32F030 in the end of preprocessor macros instead of STM32fF030CC
March 18, 2016 at 14:44 #7808karlis77ParticipantI updated BSP to V3.5, but it still does not work.
This is stm32.mak file of the project
#This file is generated by VisualGDB.
#It contains GCC settings automatically derived from the board support package (BSP).
#DO NOT EDIT MANUALLY. THE FILE WILL BE OVERWRITTEN.
#Use VisualGDB Project Properties dialog or modify Makefile or per-configuration .mak files instead.#VisualGDB provides BSP_ROOT and TOOLCHAIN_ROOT via environment when running Make. The line below will only be active if GNU Make is started manually.
BSP_ROOT ?= $(LOCALAPPDATA)/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32
EFP_BASE ?= $(LOCALAPPDATA)/VisualGDB/EmbeddedEFPs
TOOLCHAIN_ROOT ?= C:/SysGCC/arm-eabi#Embedded toolchain
CC := $(TOOLCHAIN_ROOT)/bin/arm-eabi-gcc.exe
CXX := $(TOOLCHAIN_ROOT)/bin/arm-eabi-g++.exe
LD := $(CXX)
AR := $(TOOLCHAIN_ROOT)/bin/arm-eabi-ar.exe
OBJCOPY := $(TOOLCHAIN_ROOT)/bin/arm-eabi-objcopy.exe#Additional flags
PREPROCESSOR_MACROS += ARM_MATH_CM0 STM32F030CC stm32_flash_layout STM32F030
INCLUDE_DIRS += . $(BSP_ROOT)/STM32F0xxxx/STM32F0xx_StdPeriph_Driver/inc $(BSP_ROOT)/STM32F0xxxx/CMSIS_StdPeriph/Device/ST/STM32F0xx/Include $(BSP_ROOT)/STM32F0xxxx/CMSIS_StdPeriph/Include $(BSP_ROOT)/STM32F0xxxx/CMSIS_StdPeriph/RTOS
LIBRARY_DIRS +=
LIBRARY_NAMES += compactcpp
ADDITIONAL_LINKER_INPUTS +=
MACOS_FRAMEWORKS +=
LINUX_PACKAGES +=CFLAGS +=
CXXFLAGS +=
ASFLAGS +=
LDFLAGS +=
COMMONFLAGS += -mcpu=cortex-m0 -mthumb
LINKER_SCRIPT := $(BSP_ROOT)/STM32F0xxxx/LinkerScripts/STM32F030CC_flash.ldsMarch 19, 2016 at 05:27 #7812supportKeymasterHi,
It looks like the file still defines the STM32F030CC macro. Could you let us know what exactly is broken with the project? Do you get some build error or is some functionality broken?
March 21, 2016 at 08:43 #7816karlis77ParticipantWhen I make a project with STM32F051R8 then in STM32f0xx.h file it is highlighted that STM32f051R8 is selected and everything is fine.
When I make project with STM32F030CC then in STM32f0xx.h file it is highlighted that STM32F030 is selected and I can’t access features which STM32f030cc has.
I uploaded 2 pictures below so you can see what I mean.
March 23, 2016 at 17:02 #7820supportKeymasterHi,
Please try clicking the “Regenerate MCU files” button on the Embedded Project page of VisualGDB Project Properties. This should update the preprocessor macros to the ones defined in the latest BSP.
April 14, 2016 at 12:45 #7953karlis77ParticipantThanks for answer.
I can’t seem to find this “Regenerate MCU files” button. This is how the window appears to me.
April 14, 2016 at 19:01 #7955supportKeymasterHi,
The “regenerate MCU files” button is only available starting from the Custom edition.
If you are using the Embedded or Linux edition, you can simply change something on the Makefile Settings page (e.g. add a space to CFLAGS and delete it) and press “Apply”.
-
AuthorPosts
- You must be logged in to reply to this topic.