реклама на сайте
подробности

 
 
 
Reply to this topicStart new topic
> не линкует Ride7 (GCC)
Огурцов
сообщение Nov 15 2012, 03:39
Сообщение #1


Гуру
******

Группа: Участник
Сообщений: 3 928
Регистрация: 28-03-07
Из: РФ
Пользователь №: 26 588



Может быть тупой вопрос, но никак невкурю. Проект собирался? под Atolic, пытаюсь собрать под Ride7. Компиляция проходит, define на модуль enc28j60 в котором определены потерянные функции в сырцах точно прописаны, enc28j60.o создается.

CODE
Running: LD Linker
"C:\Program Files\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -Wl,-T -Xlinker "C:\VICTOR`S\Stm32\ride_test1\Out\ride_test.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -Wl,-Map -Xlinker "C:\VICTOR`S\Stm32\ride_test1\Out\ride_test.map" -nostartfiles
C:\VICTOR`S\Stm32\ride_test1\Out\main.o: In function `main':
C:\VICTOR`S\Stm32\ride_test1/main.c:93: undefined reference to `ENC28J60_GPIO_Configuration'
C:\VICTOR`S\Stm32\ride_test1\Out\dhcp.o: In function `dhcp_start':
C:\VICTOR`S\Stm32\ride_test1/dhcp.c:140: undefined reference to `enc28j60EnableBroadcast'
C:\VICTOR`S\Stm32\ride_test1\Out\dhcp.o: In function `have_dhcpack':
C:\VICTOR`S\Stm32\ride_test1/dhcp.c:305: undefined reference to `enc28j60DisableBroadcast'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60SpiInit':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:70: undefined reference to `ENC28J60_SPI1_Configuration'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60Init':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:80: undefined reference to `enc28j60Init'
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:81: undefined reference to `enc28j60clkout'
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:89: undefined reference to `enc28j60PhyWrite'
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:94: undefined reference to `enc28j60PhyWrite'
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:100: undefined reference to `enc28j60PhyWrite'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60clkout':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:105: undefined reference to `enc28j60clkout'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60linkup':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:109: undefined reference to `enc28j60linkup'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60EnableBroadcast':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:113: undefined reference to `enc28j60EnableBroadcast'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60DisableBroadcast':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:117: undefined reference to `enc28j60DisableBroadcast'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60EnableMulticast':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:121: undefined reference to `enc28j60EnableMulticast'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60DisableMulticast':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:125: undefined reference to `enc28j60DisableMulticast'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60Read':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:129: undefined reference to `enc28j60Read'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60Revision':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:133: undefined reference to `enc28j60getrev'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60PhyWrite':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:137: undefined reference to `enc28j60PhyWrite'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60PacketReceive':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:141: undefined reference to `enc28j60PacketReceive'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60PacketSend':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:145: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_init_len_info':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:202: undefined reference to `init_len_info'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_get_tcp_data_pointer':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:219: undefined reference to `get_tcp_data_pointer'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_tcp_client_send_packet':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:271: undefined reference to `tcp_client_send_packet'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_tcp_get_dlength':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:275: undefined reference to `tcp_get_dlength'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `resolveHostname':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:397: undefined reference to `enc28j60PacketReceive'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `allocateIPAddress':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:474: undefined reference to `enc28j60PacketReceive'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60PowerUp':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:513: undefined reference to `enc28j60PowerUp'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_enc28j60PowerDown':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:517: undefined reference to `enc28j60PowerDown'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_nextTcpState':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:523: undefined reference to `nextTcpState'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_currentTcpState':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:527: undefined reference to `currentTcpState'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_tcpActiveOpen':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:534: undefined reference to `tcpActiveOpen'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_tcpPassiveOpen':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:538: undefined reference to `tcpPassiveOpen'
C:\VICTOR`S\Stm32\ride_test1\Out\EtherShield.o: In function `ES_tcpClose':
C:\VICTOR`S\Stm32\ride_test1/EtherShield.c:542: undefined reference to `tcpClose'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `make_arp_answer_from_request':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:431: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `make_echo_reply_from_request':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:446: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `make_udp_reply_from_request':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:484: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `make_tcp_synack_from_syn':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:529: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `make_tcp_ack_from_any':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:630: undefined reference to `enc28j60PacketSend'
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o:C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:655: more undefined references to `enc28j60PacketSend' follow
C:\VICTOR`S\Stm32\ride_test1\Out\ip_arp_udp_tcp.o: In function `packetloop_icmp_tcp':
C:\VICTOR`S\Stm32\ride_test1/ip_arp_udp_tcp.c:1461: undefined reference to `enc28j60linkup'
collect2: ld returned 1 exit status

Build failed


Где ж я накосячил ?

Сообщение отредактировал Огурцов - Nov 15 2012, 03:40
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение Nov 15 2012, 06:55
Сообщение #2


Гуру
******

Группа: Модераторы
Сообщений: 8 455
Регистрация: 15-05-06
Из: Рига, Латвия
Пользователь №: 17 095



QUOTE (Огурцов @ Nov 15 2012, 05:39) *
enc28j60.o создается.
А в линковке он участвует? Еще возможно, что он или main компилятся как С++, тогда включается декорация имен и для корректной линковки нужно нужные функции объявлять с extern "C"


--------------------
На любой вопрос даю любой ответ
"Write code that is guaranteed to work, not code that doesn’t seem to break" (C++ FAQ)
Go to the top of the page
 
+Quote Post
Огурцов
сообщение Nov 15 2012, 09:30
Сообщение #3


Гуру
******

Группа: Участник
Сообщений: 3 928
Регистрация: 28-03-07
Из: РФ
Пользователь №: 26 588



Цитата(Сергей Борщ @ Nov 15 2012, 07:55) *
А в линковке он участвует? Еще возможно, что он или main компилятся как С++, тогда включается декорация имен и для корректной линковки нужно нужные функции объявлять с extern "C"


Похоже, что участвует.

CODE


/*
!!! Primary linker script file generated automatically !!!
This file contains the input and output files names
It also includes the secondary/main linker script that is specified in the Ride options (default or custom)
*/

SEARCH_DIR(".")
SEARCH_DIR("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out")
SEARCH_DIR("C:\Program Files\Raisonance\Ride\Lib\ARM")
STARTUP("startup_stm32f10x_hd.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\main.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\websrv_help_functions.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\dhcp.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\dnslkup.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\ip_arp_udp_tcp.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\misc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\ramfunc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4_discovery.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_adc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_can.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_crc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_cryp.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_cryp_aes.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_cryp_des.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_cryp_tdes.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_dac.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_dbgmcu.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_dcmi.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_dma.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_exti.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_flash.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_fsmc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_gpio.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_hash.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_hash_md5.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_hash_sha1.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_i2c.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_iwdg.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_pwr.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_rcc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_rng.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_rtc.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_sdio.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_spi.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_syscfg.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_tim.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_usart.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\stm32f4xx_wwdg.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\enc28j60.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\ethershield.o")
INPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\delay.o")
EXTERN( __io_putchar )
EXTERN( _write )
GROUP(
"STM32x_io_putchar_thumb.a"
"std_sbrk_thumb.lib"
"smallprintf_thumb.a"
"libc.a"
"libm.a"

)
INCLUDE "C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\STM32F407_64K_64K_FLASH.ld"
OUTPUT("C:\Victor`s\Dropbox\STM32\ride_enc28j60\Out\ride_test.elf")



C++ библиотеки отключены - все что нашел про ++

Вот что пытаюсь собрать: https://www.dropbox.com/sh/lxxiuj7oqru4qqh/-R7ide38sT
Вечером проверю еще раз, все ли включено
Go to the top of the page
 
+Quote Post
Огурцов
сообщение Nov 17 2012, 19:02
Сообщение #4


Гуру
******

Группа: Участник
Сообщений: 3 928
Регистрация: 28-03-07
Из: РФ
Пользователь №: 26 588



Таки собрал, какой-то похожий проект, только под stm32f103 и под Атоликом. Ругался точно так же. Точно не уверен, но возможно помогли установка USE_FULL_ASSERT;USE_STDPERIPH_DRIVER и подключение stm32f10x_conf.h для предотвращения рекурсии хидеров.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 20th July 2025 - 12:26
Рейтинг@Mail.ru


Страница сгенерированна за 0.01396 секунд с 7
ELECTRONIX ©2004-2016