ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
19 июля
15332
Andrew_Q (08.10.2004 08:35, просмотров: 2834)
Помогите AVR C & assembler mixing Вроде делаю все как в AVR034: Mixing C and Assembly Code with IAR Embedded Workbench for AVR, а линкер выдает, что неопределена функция (та которая в асме) NAME check_crc8 #include "iom16.h" PUBLIC check_crc8 ; Имя функции в С RSEG CODE ; Код расположить в RSEG ;Update CRC ;Input: R16 - текущая CRC8 ; R20 - следующий входной байт ;Out: R16 - новая CRC8 check_crc8: push R17 push R21 ldi R17,8 ;Set to shift eight bits CRCL: mov R21,R20 eor R21,R16 ;Calculate DQIN xor CRCT0 ror R21 ;Move it to the carry brcc ZERO ;Skip if DQIN xor CRCT0 = 0 ldi R21,0x18 eor R16,R21 ;Update the CRC value ZERO: ror R16 ;Position the new CRC lsr R20 ;Position next bit in LSB dec R17 brne CRCL ;Repeat for eight bits pop R21 pop R17 ret ;Return END в С / П/п формирования/проверки CRC8 extern unsigned char check_crc8(unsigned char,unsigned char); .... prx->crc8=check_crc8(prx->crc8,data); линкер выдает Error[e46]: Undefined external "check_crc8(unsigned char, unsigned char)" referred in uart ( D:\Мои документы\Projects\AVR\BWR\Debug\Obj\uart.r90 ) Где чего напортачил?