Author Topic: Build Error  (Read 12590 times)

Offline abhimanyum

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Ae Applications
Build Error
« on: September 02, 2011, 04:13:21 PM »
Hi Mark,

When I'm using GNU Tool for making object files, I'm getting following error, if you can please help me with that.

Command:
Code: [Select]
C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin>arm-none-eabi-gcc -march=arm
v5te -Wall -Wstrict-prototypes -I C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3 -
D _GNU -D _STR91XF -g -c -Os C:\RTOS\uTaskerRTOS\Hardware\STR91XF\STR91XF.c -o C
:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\STR91XF.o

Error:
Code: [Select]
In file included from C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3/config.h:433:
0,
                 from C:\RTOS\uTaskerRTOS\Hardware\STR91XF\STR91XF.c:34:
C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3/TaskConfig.h:90:1: warning: functio
n declaration isn't a prototype
C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3/TaskConfig.h:91:1: warning: functio
n declaration isn't a prototype
C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3/TaskConfig.h:92:1: warning: functio
n declaration isn't a prototype
C:\DOCUME~1\ABHIMA~1\LOCALS~1\Temp\ccXDoOmn.s: Assembler messages:
C:\DOCUME~1\ABHIMA~1\LOCALS~1\Temp\ccXDoOmn.s:612: Error: undefined symbol DISAB
LE_ARM_INTS used as an immediate value
C:\DOCUME~1\ABHIMA~1\LOCALS~1\Temp\ccXDoOmn.s:647: Error: undefined symbol ENABL
E_ARM_INTS used as an immediate value

Thanks & Regards,
Ab

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Build Error
« Reply #1 on: September 02, 2011, 05:22:27 PM »
Hi Ab

The first few lines are warnings about a function without a prototype. These can be ignored.

I have attached a small code update which has allowed the STR91XF V1.3 project to operate with GCC (as well as a reference linker script and make file).

Regards

Mark

Offline abhimanyum

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Ae Applications
Re: Build Error
« Reply #2 on: September 02, 2011, 06:46:50 PM »
Thanks Mark

Offline abhimanyum

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Ae Applications
Re: Build Error
« Reply #3 on: September 02, 2011, 08:00:32 PM »
Hi Mark,

I was able to create STR91XF.o object file.
When I'm trying to create the ELF file with following command

Code: [Select]
C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin>arm-none-eabi-gcc -march=arm
v5te -mlittle-endian -mthumb -mthumb-interwork -Wstrict-prototypes -IC:\RTOS\uTa
skerRTOS\Applications\uTaskerV1.3 -D _GNU  -D _STR91XF -g -Os -Wl,-Map=C:\RTOS\u
TaskerRTOS\Applications\uTaskerV1.3\GNU_STR91XF\uTaskerV1.3.map --no-gc-sections
 -nostartfiles -TC:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\GNU_STR91XF\uTaske
rV1.3.ld -o uTaskerV1.3.elf C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\a
.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\application.o C:\RTOS\uTas
kerRTOS\Applications\uTaskerV1.3\Build\arp.o C:\RTOS\uTaskerRTOS\Applications\uT
askerV1.3\Build\debug.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\dhcp
.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\dns.o  C:\RTOS\uTaskerRTOS
\Applications\uTaskerV1.3\Build\Driver.o C:\RTOS\uTaskerRTOS\Applications\uTaske
rV1.3\Build\eth_drv.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\Ethern
et.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\ftp.o  C:\RTOS\uTaskerRT
OS\Applications\uTaskerV1.3\Build\GlobalTimer.o C:\RTOS\uTaskerRTOS\Applications
\uTaskerV1.3\Build\http.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\ic
mp.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\ip.o  C:\RTOS\uTaskerRTO
S\Applications\uTaskerV1.3\Build\ip_utils.o C:\RTOS\uTaskerRTOS\Applications\uTa
skerV1.3\Build\KeyScan.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\LCD
.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\NetworkIndicator.o  C:\RTO
S\uTaskerRTOS\Applications\uTaskerV1.3\Build\pop3.o C:\RTOS\uTaskerRTOS\Applicat
ions\uTaskerV1.3\Build\smtp.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build
\tcp.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\telnet.o C:\RTOS\uTas
kerRTOS\Applications\uTaskerV1.3\Build\tftp.o  C:\RTOS\uTaskerRTOS\Applications\
uTaskerV1.3\Build\Tty_drv.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\u
dp.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\uFile.o C:\RTOS\uTasker
RTOS\Applications\uTaskerV1.3\Build\uMalloc.o  C:\RTOS\uTaskerRTOS\Applications\
uTaskerV1.3\Build\uTasker.o C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\w
atchdog.o  C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\webInterface.o C:\
RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\webutils.o C:\RTOS\uTaskerRTOS\A
pplications\uTaskerV1.3\Build\crt0_STR91x.o C:\RTOS\uTaskerRTOS\Applications\uTa
skerV1.3\Build\STR91XF.o


I'm getting following error:

Code: [Select]
C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\crt0_STR91x.o: In function `_
_str_enable_interrupt':
C:\RTOS\uTaskerRTOS\Hardware\STR91XF/crt0_STR91x.s:401: undefined reference to `
VIC0_BASE'
C:\RTOS\uTaskerRTOS\Hardware\STR91XF/crt0_STR91x.s:401: undefined reference to `
VIC1_BASE'
C:\RTOS\uTaskerRTOS\Applications\uTaskerV1.3\Build\STR91XF.o:(.rodata+0xa0): und
efined reference to `fnPPP'
collect2: ld returned 1 exit status


Thanks & Regards,
Ab

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Build Error
« Reply #4 on: September 02, 2011, 10:52:49 PM »
Ab

crt0_STR91x.s is the start-up file used together with UAR. There will be another one called something like crt0_gcc.s which is used together with GCC instead.

fnPPP() is in ppp.c, which may not be in the list of object files to be linked (?). Make sure that USE_PPP is disabled since the PPP demonstration is not of importance.

Regards

Mark


Offline abhimanyum

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Ae Applications
Re: Build Error
« Reply #5 on: September 02, 2011, 11:50:19 PM »
Hi Mark,

I'm afraid I was unable to find crt0_gcc.s 1.3 version, is it in 1.4?


Thanks & Regards,
Ab

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Build Error
« Reply #6 on: September 03, 2011, 08:06:20 PM »
Hi Ab

I checked my V1.4 project code and have seen that I made a mistake with the name (although there was an str91_gcc.s hanging around somewhere). Also I saw that there are targets prepared for various compilers (IAR4, IAR6, Keil, Rowley, GCC).[/tt]

To maybe make things easier I checked the uTaskerV1.4 project (not the serial loader and boot loader projects) in the simulator, with IAR4 and GCC and all targets built correctly. Therefore I put this (provisional) V1.4 version here: http://www.utasker.com/forum/index.php?topic=1673.0

This builds with GCC (I didn't check whether it ran but I assume that it did the last time it was used) so you can check it on your board - at least the build should be OK.

Maybe, if there is some interest in the STR91XF V1.4 project, the V1.4 version (which in fact includes most up-to-date feature like zero-configuration)  can then be gradually verified and corrected where necessary for the various compiler targets.

Regards

Mark

Offline abhimanyum

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Ae Applications
Re: Build Error
« Reply #7 on: September 06, 2011, 01:18:38 PM »
Hi Mark,

After using your uTasker1.4 LD file I was able to compile, link all files and finally got the ELF File.
I'm using  OpenOCD for flashing my comstick, but when I issue run command to it, nothing actually is happening, though Open OCD saying the comstick is running, but I'm not able to get the data as I'm reading it through GPIO ports.

The Taskconfig is as follows (if required):

#ifdef FN_INTRO_TASK
{ "1",   fnIntroTask,   NO_QUE,   10,   10,   UTASKER_STOP},
#endif

Thanks,
Ab

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Build Error
« Reply #8 on: September 07, 2011, 08:56:46 PM »
Ab

I can't judge what is happening since I don't know whether you have Flashed the device correctly and also not whether the device has been configured to boot from the correct boot block.

Assuming that the program has been Flashed correctly you will need to step the code with the debugger to know whether it is running or not. If the IDE says that the device is running you shoudl be able to stop it running (pause or similar command) to see where the code is actually at. If it is in the scheduler it looks good but if not there could be any one of a number fo problems. It is generally best to view memory to see whether the expected code is there - then single step the code from the reset vector to see what is going on if it ends up in a exception.

Regards

Mark