Jump to content

Eclipse and Demos


MobileWill

Recommended Posts

I decided to give Eclipse a try. I am using the ChibiOS Studio and for the most part the demos work. I am trying another one now but I get 

 

c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-abort.o): In function `abort':
abort.c:(.text.abort+0xa): undefined reference to `_exit'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text._kill_r+0xe): undefined reference to `_kill'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-signalr.o): In function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x10): undefined reference to `_write'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text._close_r+0xc): undefined reference to `_close'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text._fstat_r+0xe): undefined reference to `_fstat'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x10): undefined reference to `_lseek'
c:/chibistudio/tools/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text._read_r+0x10): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status

This is for a gwin demo. I think I have fixed this in the past and it had something to do with libc or something. 

 

I tried the images_animated but that gives a red strip and the rest of the screen is a light blue. But the other demos worked.

 

I still prefer Embitz but it was easier to get up and running. Just wish Stlinkgdb/openocd was working with Win10 better. 

Edited by MobileWill
Link to comment
Share on other sites

Something is pulling in those routines from the C runtime library.

Find the code that is referencing those routines and fix the problem.

It could also be the startup code for your C runtime library itself that is including those routines. In that case you need to use a different C runtime library or set the flags to your compiler to run off the standard C startup routines.

Often setting your compiler to produce a map file will help as that will tell you which c source files are calling those routines.

Link to comment
Share on other sites

I added syscall.c to the Makefire under the CSRC = that I copied from the Chibios Makefile. I noticed if you use the ugfx Makefile you loose all the settings in the Chibios Makefile. So should I combine the two or are they included some other way? Well probably not since I also had to add main.c when using my own code and not the demos which I have had to do before with the uGfx makefile. 

 

Still have some include issues to work through. 

Edited by MobileWill
Link to comment
Share on other sites

39 minutes ago, MobileWill said:

I noticed if you use the ugfx Makefile you loose all the settings in the Chibios Makefile. So should I combine the two or are they included some other way?

If you want full control I would recommend you following this very short guide that will explain to you how to modify the ChibiOS makefile to include uGFX: http://wiki.ugfx.org/index.php/Using_ChibiOS/RT

 

35 minutes ago, MobileWill said:

../../ugfx/src/ginput/ginput_mouse.c:699: undefined reference to `LoadMouseCalibration'

That happens when you have GINPUT_TOUCH_USER_CALIBRATION_LOAD set to TRUE in your configuration file without actually supplying the corresponding loading routine for the calibration data. You can find more information about that here: http://wiki.ugfx.org/index.php/Touchscreen_Calibration

Link to comment
Share on other sites

Thanks I hadn't seen that link. I had followed the one for Chibios Studio IDE which I am using. Maybe this one will work better.

 

I must have include problems because the calibration.h is included and my own header but isn't being included when compiling. I really don't like Eclipse. lol. How do I get it to include those files? Embitz just allows you to manage in the explorer. 

Edited by MobileWill
Link to comment
Share on other sites

I think give up on Eclipse and remember why its a pain and a big time waster. It won't even include my simple header file. I shouldn't have to spend an hour to include a file and still not working. (End rant) The files are there in plain sight. How in the world do you get it to include it. I tried everything. It won't include anything other than the base ugfx and chibios files. I tired adding the directories in the UI and in the makefile. I have wasted enough time. 

And the load calibration must be related to it not including a header file that is inside the project directory, go figure. 

Edited by MobileWill
Link to comment
Share on other sites

Note that with headers you don't have to add the actual file but just the path to the directory CONTAINING the file. In case of the file is in the top-level directory you might have to add that path too (simply add . as path, but I am not sure if that's required or not). Otherwise put those files in a directory named config or something like that and add that one to the include path.
Also note that those paths should be relative.

Link to comment
Share on other sites

I tried everything and it didn't seem to make a difference. So last night I decided to try VisualGDB which is pretty nice which lead me to deciding to try Embitz again with make. So far I made some good progress. It seems to be working out. (On a side note, the openOCD on VisualGDB works well on Win10 so I copied it over to Embitz). This weekend I will try and get my project over to the new make project and then I can use pixmaps. Yay! I understand the make process and config better now so I can tweak things to line up with Embitz and debugging. So much better than Eclipse. 

What do you guys use for dev?

Link to comment
Share on other sites

37 minutes ago, MobileWill said:

What do you guys use for dev?

Whenever possible: Texteditor & make. Whenever required: Keil. Always avoiding: Eclipse.
Yeah, that sums it up pretty well I think :)
Personally I used EmBlocks in the past but it became too cumbersome for me. It has great potential but the project lacks the man-power to move forward.

The next thing I want to try is this: http://www.rowley.co.uk/arm/

Link to comment
Share on other sites

Oooo looks nice. Still cheaper than like Keil too. 

Yeah Embitz has great potential just needs some polishing. Fix the debugger and OS Support and I would be set. 

Hopefully tonight goes well. I would like to try out some of the larger demos too. I should be able to now. I think in Eclipse it would of worked now that I figured to add syscalls.c to the makefile. You should add it to the uGfx makefile examples. 

Link to comment
Share on other sites

I use eclipse all the time however it has been set up for a couple of years now and i am very careful when playing with the config.

It has been on my mind now for a while to find and select an approved ide/debugger but havent had time yet. The one's i have tried all seem to have some oroblem or another. Eg

Keil - good ide/debugger, no makefile projects, keil compilers only

Eclipse - good ide, frustrating debug, frustrating config

Embitz - funny ide editor, some cross platform issues, strange debugger. Interacts strangely with makefile projects in terms of determing project dependancies.

Etc etc.

 

Link to comment
Share on other sites

So after trying Makefile with Embitz I ended up with the same errors as Eclipse. Go figure. But in the process I learned a lot about the Makefile system. I guess my inexperience was the source of the problem. I didn't realize every .c file has to be added to the Makefile. I guess I am used to auto discovery. So now in Embitz all the Makefile errors that were the same as Eclipse are fixed. I just have one left about osalDbgAssert but that is a ChibiOS problem. 

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...