Перейти к содержанию
    

Не могу собрать проект 'Hello Wirld !'

Итак: работаю под linux (до недавнего времени имел дело с Keil и iAR (юзал uCOSII собранную под ними)). Перехожу под linux.

Использую кросскомпилятор

[yra@localhost HelloWorld]$ arm-none-linux-gnueabi-gcc -v

Using built-in specs.

Target: arm-none-linux-gnueabi

Configured with: /scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp--disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q1-203' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/obj/host-libs-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/obj/host-libs-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/bin

Thread model: posix

gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)

 

Скачал freeRTOS. Конкретно заинтересовал порт под lpc2368 GCC. Бинарник с помощью прилагаемого Make- файла так и не собрался:

error: no memory region specified for loadable section `.rel.dyn'

 

Нигде не нашел что это за секция `.rel.dyn' фокус с подсовывынием в ld - файл строчки

. = ALIGN(32 / 8);

.rel.dyn : { *(.rel.dyn) } > sdram

не прокатил.

 

Полный текст ld - файла:

MEMORY

{

flash : ORIGIN = 0x00000000, LENGTH = 512K

ram : ORIGIN = 0x40000000, LENGTH = 64K

usbram : ORIGIN = 0x7FD00000, LENGTH = 16K

ethram : ORIGIN = 0x7FE00000, LENGTH = 16K

 

sdram : ORIGIN = 0xA0000000, LENGTH = 32M

}

 

__stack_end__ = 0x40000000 + 64K - 4;

 

SECTIONS

{

. = 0;

startup : { *(.startup)} >flash

 

prog :

{

*(.text)

*(.rodata) /* (. rodata) => сегмент для постоянных данных */

*(.rodata*)

/* *(.glue_7) эти участки предоставляются для хранения ARM / Thumb межсетевого код. */

/* *(.glue_7t) эти участки предоставляются для хранения ARM / Thumb межсетевого код. */

 

} >flash

 

__end_of_text__ = .;

 

.data :

{

__data_beg__ = .;

__data_beg_src__ = __end_of_text__;

*(.data)

*(.interp) /* ХЗ что это за секция. ПОка не нашел на неё описания... */

*(.plt) /* ХЗ что это за секция. ПОка не нашел на неё описания... */

__data_end__ = .;

} >ram AT>flash

 

.bss :

{

__bss_beg__ = .;

*(.bss)

} >ram

 

/* Align here to ensure that the .bss section occupies space up to

_end. Align after .bss to ensure correct alignment even if the

.bss section disappears because there are no input sections. */

. = ALIGN(32 / 8);

_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;

 

.usbram (NOLOAD):

{

__usbram_beg__ = .;

*(.dmaram)

__usbram_end__ = .;

} >usbram

 

.ethram (NOLOAD):

{

__ethram_beg__ = .;

*(.ethram)

__ethram_end__ = .;

} >ethram

 

 

. = ALIGN(4);

.dynsym : { *(.dynsym) } > sdram

 

. = ALIGN(32 / 8);

.dynamic : { *(.dynamic) } > sdram

 

. = ALIGN(32 / 8);

.got.plt : { *(.got.plt) } > sdram

 

. = ALIGN(4);

.dynstr : { *(.dynstr) } > sdram

 

. = ALIGN(32 / 8);

.hash : { *(.hash) } > sdram

 

 

 

. = ALIGN(32 / 8);

.gnu.version : { *(.gnu.version) } > sdram /* эти секции нужны для stdlib */

 

. = ALIGN(32 / 8);

.gnu.version_r : { *(.gnu.version_r) } > sdram /* эти секции нужны для stdlib */

 

 

. = ALIGN(32 / 8);

.rel.dyn : { *(.rel.dyn) } > sdram

 

 

 

 

. = ALIGN(4);

.ARM.exidx : { *(.ARM.exidx) } > sdram

 

 

}

. = ALIGN(32 / 8);

_end = .;

 

PROVIDE (end = .);

секция sdram в данном случае непринципиальна.(всё равно предполагаю через u-boot грузиться.)

 

Помогите пожалуйста разобраться что не так (Точн знаю, что эта секция нужна для stdlib. Подозреваю, что эта секция для определения диапазона динамически выделяемой памяти.)

 

Самое интересное, что u-boot у меня собирается и работает (но там make - файл слишком наворочен, а ld - файл упрощён).

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Дайте хотябы ссылку на бинарники нормального gcc - компилятора (под linux) которым можно собрать freeRTOS.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

У вас компилятор кажись не тот. Дл freeRtos надо не

arm-none-linux-gnueabi-gcc

а

arm-none-eabi-gcc,

то есть без -linux

 

Дайте хотябы ссылку на бинарники нормального gcc - компилятора (под linux) которым можно собрать freeRTOS.

 

да там же, на CodeSourcery.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Хрен редьки не слаще:

[yra@localhost RTOSDemo]$ arm-none-eabi-gcc -v

Using built-in specs.

Target: arm-none-eabi

Configured with: /scratch/maxim/arm-lite/src-4.3-arm-none-eabi-lite/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-eabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-shared --with-newlib --with-pkgversion='Sourcery G++ Lite 2009q1-161' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-headers=yes --with-sysroot=/opt/codesourcery/arm-none-eabi --with-build-sysroot=/scratch/maxim/arm-lite/install-4.3-arm-none-eabi-lite/arm-none-eabi --with-gmp=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/host-libs-2009q1-161-arm-none-eabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/maxim/arm-lite/obj-4.3-arm-none-eabi-lite/host-libs-2009q1-161-arm-none-eabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-eabi-lite/arm-none-eabi/bin --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-eabi-lite/arm-none-eabi/bin

Thread model: single

gcc version 4.3.3 (Sourcery G++ Lite 2009q1-161)

 

другая проблемма:

ortable/MemMang/heap_2.o boot.s -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':

sbrkr.c:(.text+0x18): undefined reference to `_sbrk'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':

writer.c:(.text+0x20): undefined reference to `_write'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':

closer.c:(.text+0x18): undefined reference to `_close'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':

fstatr.c:(.text+0x1c): undefined reference to `_fstat'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':

isattyr.c:(.text+0x18): undefined reference to `_isatty'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':

lseekr.c:(.text+0x20): undefined reference to `_lseek'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':

readr.c:(.text+0x20): undefined reference to `_read'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text'

/home/yra/x-tools/arm-2009q1/bin/../lib/gcc/arm-none-eabi/4.3.3/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text'

collect2: ld returned 1 exit status

make: *** [RTOSDemo.elf] Ошибка 1

 

Здесь не находит функций _sbrk _write ...

Пробовал тупо в мэйкфайле в опциях компилятора указать -D MISSING_SYSCALL_NAMES \ т.к нашел файл :

#ifndef __SYSLIST_H

#define __SYSLIST_H

 

#ifdef MISSING_SYSCALL_NAMES

#define _close close

#define _execve execve

#define _fcntl fcntl

#define _fork fork

#define _fstat fstat

#define _getpid getpid

#define _gettimeofday gettimeofday

#define _isatty isatty

#define _kill kill

#define _link link

#define _lseek lseek

#define _open open

#define _read read

#define _sbrk sbrk

#define _stat stat

#define _times times

#define _unlink unlink

#define _wait wait

#define _write write

#endif /* MISSING_SYSCALL_NAMES */

не помогло..

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Хрен редьки не слаще

Ну это уже мелочи. Добавьте к проекту вот это: stf_syscalls_minimal.rar

 

Кстати, это я взял как раз из какого-то примера под FreeRtos...

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Спасибо помогло: собирается. Насчёт работает-ли?... буду дальше ковырять

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Следующие осложнения: для полураскошной отладки кода нужно использовать функцию printf. Для того, чтобы эта функция печатала в последовательный порт нужно инициализировать этот порт, и создать функцию putchar типа:

57 int putchar(int ch)

58 {

59 while((U0LSR & (1<<5)) == 0); /* Wait for empty U0THR */

60 U0THR = ch;

61 return ch;

62 }

 

в общем, компилятор выдайт такую ошибку:

stf_syscalls_minimal.c:57: error: expected identifier or '(' before '--' token

Что-то в int putchar(int ch) не нрваится ему (если делаю int putchar1(int ch) - то всё нормально - это ошибка не синтаксиса). Что-то я туплю с этим gcc (в кеиле подобный фокус прокатывал без осложнений...). В u-boot вообще понамутили понамутили , но в результате printf работает. Не могу понять что они там сделали.

Копался в *.h - файлах gcc: нашел 3 файла stdio.h.

В первом из них putchar присутствует в виде:

int _EXFUN(putchar, (int));

Во втором:

extern int putchar (int __c);

В третьем:

/* Write a character to stdout. */

__STDIO_INLINE int

putchar (int __c)

{

return _IO_putc (__c, stdout);

}

 

Я так полагаю, в зависимости от опций компилятора подключается к проекту один из этих файлов. (я конечно же не тот подключил...) интересно знать какие опции... Помогите пожалуйста

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

В том stf_syscalls_minimal.c, который я постил, вызывается ф-я

int putChar(int ch);

 

Вот её-то и надо определить у себя в приложении.

Заодно поищите по своим файлам слово "putChar", похоже там где-то есть какой-то противоречивый define.

 

На крайняк поменяйте название на putChar1 (в ф-ии _write() и там где определили).

 

---------

Да, и покажите командную строку и скрипт линкера. Посмотрим, какие либы подключаются.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Вот код, вызывающий функции

int main( void )
{

       lowlevel_init(); // взял из u-boot
       serial_init(); // взял из u-boot

       serial_putc ('1');  //тоже самое что и putChar
       putChar('2');


printf("Hello World !!");

putChar('3');
...

 

Вот makefile : (я там убил thumb interwork)

RTOS_SOURCE_DIR=../../../Source
DEMO_COMMON_DIR=../../Common/Minimal
DEMO_INCLUDE_DIR=../../Common/include
UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip



#CROSS_COMPILE = arm-arm7-linux-gnu-
#CROSS_COMPILE = arm-none-linux-gnueabi-
#CROSS_COMPILE = arm-unknown-elf-
CROSS_COMPILE = arm-none-eabi-



CC=$(CROSS_COMPILE)gcc
OBJCOPY=$(CROSS_COMPILE)objcopy
LDSCRIPT=lpc2478_sdram.ld

#LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
LINKER_FLAGS= -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map



DEBUG=-g
OPTIM=-O1


CFLAGS= $(DEBUG) \
        $(OPTIM) \
        -T$(LDSCRIPT) \
        -I . \
        -I ./init \
        -I $(RTOS_SOURCE_DIR)/include \
        -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx \
        -I $(DEMO_INCLUDE_DIR) \
        -I ./webserver \
        -I $(UIP_COMMON_DIR) \
        -D ROWLEY_LPC23xx \
        -D THUMB_INTERWORK \
        -mcpu=arm7tdmi \
        -D PACK_STRUCT_END=__attribute\(\(packed\)\) \
        -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
        -fomit-frame-pointer
#        -mthumb-interwork
#        -fPIC \

                                        
THUMB_SOURCE= \
        main.c \
        stf_syscalls_minimal.c \
        ./ParTest/ParTest.c \
        ./LCD/portlcd.c \
        $(DEMO_COMMON_DIR)/BlockQ.c \
        $(DEMO_COMMON_DIR)/blocktim.c \
        $(DEMO_COMMON_DIR)/flash.c \
        $(DEMO_COMMON_DIR)/integer.c \
        $(DEMO_COMMON_DIR)/GenQTest.c \
        $(DEMO_COMMON_DIR)/QPeek.c \
        $(DEMO_COMMON_DIR)/dynamic.c \
        ./webserver/uIP_Task.c \
        ./webserver/emac.c \
        ./webserver/httpd.c \
        ./webserver/httpd-cgi.c \
        ./webserver/httpd-fs.c \
        ./webserver/http-strings.c \
        $(UIP_COMMON_DIR)/uip_arp.c \
        $(UIP_COMMON_DIR)/psock.c \
        $(UIP_COMMON_DIR)/timer.c \
        $(UIP_COMMON_DIR)/uip.c \
        $(RTOS_SOURCE_DIR)/list.c \
        $(RTOS_SOURCE_DIR)/queue.c \
        $(RTOS_SOURCE_DIR)/tasks.c \
        $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \
        $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c

ARM_SOURCE= \
        $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \
        ./webserver/EMAC_ISR.c \
        ./init/lowlevel_init.c \
        ./init/irqVec.c \
        ./init/serial.c
        

THUMB_OBJS = $(THUMB_SOURCE:.c=.o)
ARM_OBJS = $(ARM_SOURCE:.c=.o)


all: RTOSDemo.bin

RTOSDemo.bin : RTOSDemo.hex
    $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin
     
RTOSDemo.hex : RTOSDemo.elf
    $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex

RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile
    $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) 

#$(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
#    $(CC) -c $(CFLAGS) -mthumb $< -o $@

$(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
    $(CC) -c $(CFLAGS) $< -o $@

$(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
    $(CC) -c $(CFLAGS) $< -o $@

clean :
    rm $(THUMB_OBJS)
    rm $(ARM_OBJS)
    touch Makefile
    rm RTOSDemo.elf
    rm RTOSDemo.hex

 

вот скрипт линкера (заточен под работу из sdram )

MEMORY 
{
    flash     : ORIGIN = 0x00000000, LENGTH = 512K
    ram     : ORIGIN = 0x40000000, LENGTH = 64K    
    usbram   : ORIGIN = 0x7FD00000, LENGTH = 16K
    ethram   : ORIGIN = 0x7FE00000, LENGTH = 16K
    
    sdram    : ORIGIN = 0xA0000000, LENGTH = 32M
}

__stack_end__ = 0x40000000 + 64K - 4;

SECTIONS 
{
    . = 0;
    startup : { *(.startup)} >sdram

    prog : 
    {
        *(.text)
        *(.rodata)  /* (. rodata) => сегмент для постоянных данных */
        *(.rodata*)
        *(.glue_7)  /* эти участки предоставляются для хранения ARM / Thumb межсетевого код. */
        *(.glue_7t) /* эти участки предоставляются для хранения ARM / Thumb межсетевого код. */        
        
    } >sdram

    __end_of_text__ = .;

    .data : 
    {
        __data_beg__ = .;
        __data_beg_src__ = __end_of_text__;
        *(.data)
        *(.interp) /* ХЗ что это за секция. ПОка не нашел на неё описания... */
        *(.plt)    /* ХЗ что это за секция. ПОка не нашел на неё описания... */        
        __data_end__ = .;
    } >sdram

    .bss : 
    {
        __bss_beg__ = .;
        *(.bss)
    } >sdram

    /* Align here to ensure that the .bss section occupies space up to
    _end.  Align after .bss to ensure correct alignment even if the
    .bss section disappears because there are no input sections.  */
    . = ALIGN(32 / 8);
    _bss_end__ = .; __bss_end__ = .; __end__ = .;

    .usbram (NOLOAD):
    {
    __usbram_beg__ = .;
    *(.dmaram)
        __usbram_end__ = .;
    } >usbram

    .ethram (NOLOAD):
    {
    __ethram_beg__ = .;
    *(.ethram)
        __ethram_end__ = .;
    } >ethram

    . = ALIGN(32 / 8);
    .ARM.exidx : { *(.ARM.exidx) } > sdram  /* без этой строчки не линкуется */


}
    . = ALIGN(32 / 8);
    _end = .;
    
    PROVIDE (end = .);

 

Вот лог компиляции:

[yra@localhost RTOSDemo]$ make
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer main.c -o main.o                                                                        
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer stf_syscalls_minimal.c -o stf_syscalls_minimal.o                                        
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ParTest/ParTest.c -o ParTest/ParTest.o                                                  
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer LCD/portlcd.c -o LCD/portlcd.o                                                          
LCD/portlcd.c:34:1: warning: "LCD_CTRL" redefined                                                                     
In file included from ./FreeRTOSConfig.h:52,                                                                          
                 from ../../../Source/include/FreeRTOS.h:61,                                                          
                 from LCD/portlcd.c:23:                                                                               
./LPC24xx.h:1150:1: warning: this is the location of the previous definition                                          
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/BlockQ.c -o ../../Common/Minimal/BlockQ.o                          
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/blocktim.c -o ../../Common/Minimal/blocktim.o                      
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/flash.c -o ../../Common/Minimal/flash.o                            
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/integer.c -o ../../Common/Minimal/integer.o                        
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/GenQTest.c -o ../../Common/Minimal/GenQTest.o                      
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/QPeek.c -o ../../Common/Minimal/QPeek.o                            
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/Minimal/dynamic.c -o ../../Common/Minimal/dynamic.o                        
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/uIP_Task.c -o webserver/uIP_Task.o                                            
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/emac.c -o webserver/emac.o                                                    
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/httpd.c -o webserver/httpd.o                                                  
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/httpd-cgi.c -o webserver/httpd-cgi.o                                          
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/httpd-fs.c -o webserver/httpd-fs.o                                            
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/http-strings.c -o webserver/http-strings.o                                    
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/ethernet/uIP/uip-1.0/uip/uip_arp.c -o ../../Common/ethernet/uIP/uip-1.0/uip/uip_arp.o                                                                                                            
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/ethernet/uIP/uip-1.0/uip/psock.c -o ../../Common/ethernet/uIP/uip-1.0/uip/psock.o                                                                                                                
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/ethernet/uIP/uip-1.0/uip/timer.c -o ../../Common/ethernet/uIP/uip-1.0/uip/timer.o                                                                                                                
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../Common/ethernet/uIP/uip-1.0/uip/uip.c -o ../../Common/ethernet/uIP/uip-1.0/uip/uip.o                                                                                                                    
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/list.c -o ../../../Source/list.o                                        
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/queue.c -o ../../../Source/queue.o                                      
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/tasks.c -o ../../../Source/tasks.o                                      
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/portable/GCC/ARM7_LPC23xx/port.c -o ../../../Source/portable/GCC/ARM7_LPC23xx/port.o                                                                                                          
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/portable/MemMang/heap_2.c -o ../../../Source/portable/MemMang/heap_2.o  
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.c -o ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer webserver/EMAC_ISR.c -o webserver/EMAC_ISR.o
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer init/lowlevel_init.c -o init/lowlevel_init.o
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer init/irqVec.c -o init/irqVec.o
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer init/serial.c -o init/serial.o
arm-none-eabi-gcc -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o ./webserver/EMAC_ISR.o ./init/lowlevel_init.o ./init/irqVec.o ./init/serial.o main.o stf_syscalls_minimal.o ./ParTest/ParTest.o ./LCD/portlcd.o ../../Common/Minimal/BlockQ.o ../../Common/Minimal/blocktim.o ../../Common/Minimal/flash.o ../../Common/Minimal/integer.o ../../Common/Minimal/GenQTest.o ../../Common/Minimal/QPeek.o ../../Common/Minimal/dynamic.o ./webserver/uIP_Task.o ./webserver/emac.o ./webserver/httpd.o ./webserver/httpd-cgi.o ./webserver/httpd-fs.o ./webserver/http-strings.o ../../Common/ethernet/uIP/uip-1.0/uip/uip_arp.o ../../Common/ethernet/uIP/uip-1.0/uip/psock.o ../../Common/ethernet/uIP/uip-1.0/uip/timer.o ../../Common/ethernet/uIP/uip-1.0/uip/uip.o ../../../Source/list.o ../../../Source/queue.o ../../../Source/tasks.o ../../../Source/portable/GCC/ARM7_LPC23xx/port.o ../../../Source/portable/MemMang/heap_2.o  boot.s -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
arm-none-eabi-objcopy RTOSDemo.elf -O ihex RTOSDemo.hex
arm-none-eabi-objcopy RTOSDemo.elf -O binary RTOSDemo.bin
[yra@localhost RTOSDemo]$

 

Вот лог u-boot: заливаю по com - порту в sdram проект, запускаю на выполнение, печатается символ '1',

печатается символ '2' далее виснет на функции printf("Hello World !!"); потомучто '3' уже не печатается.

**************************************************************************
*               patch to SK-LPC2478-S3E board                                             *
*      based on patch from Embedded Artists  LPC2468 OEM Board           *
**************************************************************************


U-Boot 2009.06 (�И�ю�л 23 2009 - 05:18:11)

DRAM:  32 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
SK-LPC2478-S3E # loady 0xa0000000
## Ready for binary (ymodem) download to 0xA0000000 at 38400 bps...
Cm - CRC mode, 949(SOH)/0(STX)/0(CAN) packets, 3 retries
## Total Size      = 0x0001d920 = 121120 Bytes
SK-LPC2478-S3E # go 0xa0000000
## Starting application at 0xA0000000 ...
12

 

В коде putCtar определяется только в одном месте (где я её определил)

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Насчёт uboot-а я не в курсах... Во всяком случае, не слышал, чтоб проект FreeRtos работал под u-boot.

arm-none-eabi-gcc делает standalone приложение, которое должно работать само по себе, безо всяких костылей. Может попробовать прошить его вместо u-boot-а?

Но если вы точно знаете, что это возможно, то копайте в сторону _sbrk(). Потому что printf вызывает malloc(), который, в свою очередь, зовёт _sbrk().

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Насчёт uboot-а я не в курсах... Во всяком случае, не слышал, чтоб проект FreeRtos работал под u-boot.

arm-none-eabi-gcc делает standalone приложение, которое должно работать само по себе, безо всяких костылей. Может попробовать прошить его вместо u-boot-а?

U-boot - это вторичный загрузчик (используется, например, для AT91SAM926x, y TI на ARM). Позволяет в том числе инициализировать периферию кристалла (SDRAM) и загрузить код в RAM для его выполнения. Подробности можно посмотреть на U-boot

С помощью U-boot обычно грузится linux (ядро).

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

С помощью U-boot обычно грузится linux (ядро).

Это всё понятно. А вот как им грузить standalone приложение? Он же наверное вектора прерываний свои ставит, и ещё много чего.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Это всё понятно. А вот как им грузить standalone приложение? Он же наверное вектора прерываний свои ставит, и ещё много чего.

 

u-boot, если его использовать по назначению, производит первоначальную конфигурацию системы, грузит linux, передаёт туда сведения о конфигурации системы...

 

В данном случае я делаю вот что: собрал проект для sdram (вектора прерываний у меня оказались по 0xa000000x адресам), с помощю u-boot (который после запуска конфигурит sdram) скопировал бинарник в память по 0xA0000000 адресу и передал управление этому бинарнику.

Далее выполняется стандартный ассемблерный код, связанный с инициализацией сегментов памяти и передача управления в main().

В функции lowlevel_init(); в том числе прописан код производящий ремаппинг векторов прерываний (у lpc24xx можно отображать в памяти вектра прерываний в нескольких местах...), тоесть копирование вектрорв в определённую область памяти (во внутреннюю) и установка соответствующих бит управления системой.

Этим же методом я ковырял код самого u-boot (проверял как работают вектора прерываний).

Linux - всего частный случай.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Linux - всего частный случай.

 

Ну если так, то всё должно работать:)

 

Вот ошибка:

вот скрипт линкера (заточен под работу из sdram )

.....
     . = ALIGN(32 / 8);
     .ARM.exidx : { *(.ARM.exidx) } > sdram  /* без этой строчки не линкуется */


}
     . = ALIGN(32 / 8);
     _end = .;
     
     PROVIDE (end = .);

 

 

_end - вне всех секций. А этот символ используется в _sbrk(). Засуньте его в ram наверное:

.bss : 
    {
        __bss_beg__ = .;
        *(.bss)
     _end = .;
      } >ram

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

странно: этот кусок скрипта остался от freeRTOS- овского. Я его не менял потомучто не понял к чему это...

------

нет: как ругался на функцию

int putchar(int ch)
{
  if (ch == '\n')
  {
    while((U0LSR & (1<<5)) == 0); /* Wait for empty U0THR */
    U0THR = '\r';
  }

  while((U0LSR & (1<<5)) == 0); /* Wait for empty U0THR */
  U0THR = ch;
return ch;
}

так и продолжает:

[yra@localhost RTOSDemo]$ make
arm-none-eabi-gcc -c -g -O1 -Tlpc2478_sdram.ld -I . -I ./init -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer init/serial.c -o init/serial.o
init/serial.c:90: error: expected identifier or '(' before '--' token
make: *** [init/serial.o] Ошибка 1
[yra@localhost RTOSDemo]$

 

 

 

Может наведёте на примерчики простеньких программ (желательно с printf) под gcc. На сайте atmel чтото всё под кеил да под иар.. Может ещё где видели. Чтото не подворачивается ничего. Мало информации..

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
К сожалению, ваш контент содержит запрещённые слова. Пожалуйста, отредактируйте контент, чтобы удалить выделенные ниже слова.
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...