- This topic has 2 replies, 1 voice, and was last updated 5 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › Problems building CubeMX hello world.
I don’t think it’s a major factor, but I’m using an STM32F4-discovery, instead of a nucleo.
I followed the instructions to generate and import the cubemx project into eclipse (starting on page 121)
It all seemed to be going fairly smoothly, until page 128 “The last step is to delete the following files” Those files don’t exist. I don’t expect that this is actually a problem. Perhaps they fixed CubeMX to not put those files in the project.
When I try and build, though, I get an error.
It appears that _sbrk is defined in both newlib, and in syscalls.c
What’s the correct way to deal with this? I just deleted _sbrk.c from the newlib directory and it builds, but I want to be sure it’s not going to bite me later.
Also, after adding in the led blinking code, and flashing it to the board, nothing happens.
I figured it out.
I entered 192k for the ram size during the project setup, and when editing the mem.ld script (mentioned on page 128), because the datasheet for the f407VG chip on the F4discovery says it has 192k.
Apparently it’s 128k of normal sram, and 64k of close coupled ram that’s at a different origin of 0x1000000
With that set correctly it runs. That might be worth a note in the book for those who are running off of custom boards, or ones not on the included table. Otherwise when it asks how much ram, they’ll use the total, instead of only the normal (non CC) SRAM