Jump to content

The compiled newspaper is wrong on eclipse


zhuantou215

Recommended Posts

  • 2 weeks later...

Thank you very much for your help. I used the official STM32F4xx_Eclipse_Project. There is no error in direct operation. When I change main.c, there is always the following error:

eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/libg_nano.a (lib_a-sbrkr.o): In function `_sbrk_r':

In addition, I don't know how to change the GDisplay * g in this API.

How to write gdispGDrawBox (GDisplay * g, 10, 10, width/2, height/2, 0xFFFFFF00). Can you give an example

I hope to get your help!Thanks very much!

Link to comment
Share on other sites

7 hours ago, zhuantou215 said:

I used the official STM32F4xx_Eclipse_Project. There is no error in direct operation. When I change main.c, there is always the following error:

eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/libg_nano.a (lib_a-sbrkr.o): In function `_sbrk_r':

That is not a µGFX specific error. Either you're missing your definitions for _sbrk_r() or you're calling code that you should (eg. when you use something like the NATIVEFS option in GFILE but your underlying system doesn't offer any).

 

7 hours ago, zhuantou215 said:

In addition, I don't know how to change the GDisplay * g in this API.

How to write gdispGDrawBox (GDisplay * g, 10, 10, width/2, height/2, 0xFFFFFF00). Can you give an example

All of the GDISP rendering functions come with the capital 'G' version like the one that you mentioned but they also come with a wrapper that has the exact same name but misses the capital 'G' and also doesn't have the first argument (the GDisplay pointer). When you're using the API without the 'G' it always uses the default display. The one with the 'G' is to specify which display you want to render to which is completely unnecessary when you're having just one display. That's explained here: https://wiki.ugfx.io/index.php/GDISP#Multiple_displays

Link to comment
Share on other sites

13 hours ago, zhuantou215 said:

eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/libg_nano.a (lib_a-sbrkr.o): In function `_sbrk_r':

This is most likely caused because you don't have any file that implements the memory system calls. These calls are system dependent and normally the manufacturer of your platform provides these functions.

You can also let µGFX handle memory management by setting GFX_OS_HEAP_SIZE to a non zero value. 

Link to comment
Share on other sites

Thanks very much。 But I'm using STM32F429, and the template, STM32F4xx_Eclipse_Project, doesn't have a specific model. When I compiling startup_stm32f429xx.s, I always show it:

./CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f401xe.o:(.isr_vector+0x0)  multiple definition of `g_pfnVectors'
./src/stm32f4xx_startup.o:(.isr_vector+0x0): first defined here
./CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f401xe.o: In function `SPI4_IRQHandler':
(.text.Default_Handler+0x0): multiple definition of `Default_Handler'
./src/stm32f4xx_startup.o:(.text.Default_Handler+0x0): first defined here
./CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'
./src/stm32f4xx_startup.o:(.isr_vector+0x0): first defined here
./CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.o: In function `DMA2D_IRQHandler':
(.text.Default_Handler+0x0): multiple definition of `Default_Handler'

If I do it correctly, if I want to show STM32F429, how should I change it!

Link to comment
Share on other sites

Very, very very, thank you for your help. But I have another problem.

Under eclipse, I click Debug to always show:

Error with command: GDB --version

Cannot run program "GDB": Unknown reason

I tried to install the CDT plug-in, but I couldn't solve it. Click the run button console block diagram not to display.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...