20131106-193619
This commit is contained in:
parent
4f0a0c5eec
commit
63e462ea63
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,64 +7,18 @@
|
||||
|
||||
#include "Can.h"
|
||||
|
||||
#define CANDDR_SPI DDRB
|
||||
#define CANPORT_SPI PORTB
|
||||
#define CANP_MISO PINB3
|
||||
#define CANP_MOSI PINB2
|
||||
#define CANP_SCK PINB1
|
||||
|
||||
#define CANDDR_CS DDRB
|
||||
#define CANPORT_CS PORTB
|
||||
#define CANP_CS PINB4
|
||||
|
||||
#define CANDDR_RST DDRD
|
||||
#define CANPORT_RST PORTD
|
||||
#define CANP_RST PIND6
|
||||
|
||||
Can::Can() {
|
||||
_delay_ms(10);
|
||||
init_pin();
|
||||
init_spi();
|
||||
Can::Can(Spi spi) : s(spi) {
|
||||
init_can();
|
||||
}
|
||||
|
||||
uint8_t Can::spi_putc( uint8_t data ) {
|
||||
// Sendet ein Byte
|
||||
SPDR = data;
|
||||
|
||||
// Wartet bis Byte gesendet wurde
|
||||
Led(0).color(Led::MAGENTA);
|
||||
loop_until_bit_is_set(SPSR, SPIF);
|
||||
//_delay_us(100);
|
||||
Led(0).color(Led::BLACK);
|
||||
|
||||
return SPDR;
|
||||
}
|
||||
|
||||
void Can::init_pin() {
|
||||
//SPI Pins
|
||||
CANDDR_SPI |= (1<<CANP_SCK) | (1<<CANP_MOSI);
|
||||
CANPORT_SPI &= ~((1<<CANP_SCK) | (1<<CANP_MOSI) | (1<<CANP_MISO));
|
||||
|
||||
//CS Pins
|
||||
CANDDR_CS |= (1<<CANP_CS);
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
}
|
||||
|
||||
void Can::init_spi() {
|
||||
SPCR = (1<<SPE) | (1<<MSTR);// | (1<<SPR1) | (1<<SPR0);
|
||||
//SPSR = 0;
|
||||
SPSR = (1<<SPI2X);
|
||||
}
|
||||
|
||||
void Can::init_can() {
|
||||
|
||||
// MCP2515 per Software Reset zuruecksetzten,
|
||||
// danach ist der MCP2515 im Configuration Mode
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
spi_putc( SPI_RESET );
|
||||
s.CSOn();
|
||||
s.send( SPI_RESET );
|
||||
_delay_ms(1);
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
|
||||
// etwas warten bis sich der MCP2515 zurueckgesetzt hat
|
||||
_delay_ms(10);
|
||||
@ -84,19 +38,19 @@ void Can::init_can() {
|
||||
* Bus speed = 1 / (Total # of TQ) * TQ
|
||||
* = 1 / 8 * TQ = 125 kHz
|
||||
*/
|
||||
//return;
|
||||
|
||||
// BRP = 7
|
||||
mcp2515_write_register( CNF1, (1<<BRP0)|(1<<BRP1)|(1<<BRP2) );
|
||||
//return;
|
||||
|
||||
// Prop Seg und Phase Seg1 einstellen
|
||||
mcp2515_write_register( CNF2, (1<<BTLMODE)|(1<<PHSEG11) );
|
||||
//return;
|
||||
|
||||
// Wake-up Filter deaktivieren, Phase Seg2 einstellen
|
||||
mcp2515_write_register( CNF3, (1<<PHSEG21) );
|
||||
//return;
|
||||
|
||||
// Aktivieren der Rx Buffer Interrupts
|
||||
mcp2515_write_register( CANINTE, (1<<RX1IE)|(1<<RX0IE) );
|
||||
//return;
|
||||
|
||||
/*
|
||||
* Einstellen der Filter
|
||||
*/
|
||||
@ -106,19 +60,19 @@ void Can::init_can() {
|
||||
|
||||
// Buffer 1 : Empfangen aller Nachrichten
|
||||
mcp2515_write_register( RXB1CTRL, (1<<RXM1)|(1<<RXM0) );
|
||||
//return;
|
||||
|
||||
// Alle Bits der Empfangsmaske loeschen,
|
||||
// damit werden alle Nachrichten empfangen
|
||||
mcp2515_write_register( RXM0SIDH, 0 ); //return;
|
||||
mcp2515_write_register( RXM0SIDL, 0 ); //return;
|
||||
mcp2515_write_register( RXM0EID8, 0 );
|
||||
mcp2515_write_register( RXM0EID0, 0 );
|
||||
//return;
|
||||
|
||||
mcp2515_write_register( RXM1SIDH, 0 ); //return;
|
||||
mcp2515_write_register( RXM1SIDL, 0 ); //return;
|
||||
mcp2515_write_register( RXM1EID8, 0 );
|
||||
mcp2515_write_register( RXM1EID0, 0 );
|
||||
//return;
|
||||
|
||||
/*
|
||||
* Einstellen der Pin Funktionen
|
||||
*/
|
||||
@ -128,7 +82,7 @@ void Can::init_can() {
|
||||
|
||||
// TXnRTS Bits als Inputs schalten
|
||||
mcp2515_write_register( TXRTSCTRL, 0 );
|
||||
//return;
|
||||
|
||||
// Device zurueck in den normalen Modus versetzten
|
||||
mcp2515_bit_modify( CANCTRL, 0xE0, 0);
|
||||
}
|
||||
@ -138,14 +92,14 @@ void Can::init_can() {
|
||||
void Can::mcp2515_write_register( uint8_t adress, uint8_t data )
|
||||
{
|
||||
// /CS des MCP2515 auf Low ziehen
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
s.CSOn();
|
||||
|
||||
spi_putc(SPI_WRITE);
|
||||
spi_putc(adress);
|
||||
spi_putc(data);
|
||||
s.send(SPI_WRITE);
|
||||
s.send(adress);
|
||||
s.send(data);
|
||||
|
||||
// /CS Leitung wieder freigeben
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
}
|
||||
|
||||
uint8_t Can::mcp2515_read_register(uint8_t adress)
|
||||
@ -153,15 +107,15 @@ uint8_t Can::mcp2515_read_register(uint8_t adress)
|
||||
uint8_t data;
|
||||
|
||||
// /CS des MCP2515 auf Low ziehen
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
s.CSOn();
|
||||
|
||||
spi_putc(SPI_READ);
|
||||
spi_putc(adress);
|
||||
s.send(SPI_READ);
|
||||
s.send(adress);
|
||||
|
||||
data = spi_putc(0xff);
|
||||
data = s.send(0xff);
|
||||
|
||||
// /CS Leitung wieder freigeben
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -169,15 +123,15 @@ uint8_t Can::mcp2515_read_register(uint8_t adress)
|
||||
void Can::mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data)
|
||||
{
|
||||
// /CS des MCP2515 auf Low ziehen
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
s.CSOn();
|
||||
|
||||
spi_putc(SPI_BIT_MODIFY);
|
||||
spi_putc(adress);
|
||||
spi_putc(mask);
|
||||
spi_putc(data);
|
||||
s.send(SPI_BIT_MODIFY);
|
||||
s.send(adress);
|
||||
s.send(mask);
|
||||
s.send(data);
|
||||
|
||||
// /CS Leitung wieder freigeben
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
}
|
||||
|
||||
uint8_t Can::can_send_message(CANMessage *p_message)
|
||||
@ -185,11 +139,11 @@ uint8_t Can::can_send_message(CANMessage *p_message)
|
||||
uint8_t status, address;
|
||||
|
||||
// Status des MCP2515 auslesen
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
spi_putc(SPI_READ_STATUS);
|
||||
status = spi_putc(0xff);
|
||||
spi_putc(0xff);
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOn();
|
||||
s.send(SPI_READ_STATUS);
|
||||
status = s.send(0xff);
|
||||
s.send(0xff);
|
||||
s.CSOff();
|
||||
|
||||
/* Statusbyte:
|
||||
*
|
||||
@ -214,16 +168,16 @@ uint8_t Can::can_send_message(CANMessage *p_message)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CANPORT_CS &= ~(1<<CANP_CS); // CS Low
|
||||
spi_putc(SPI_WRITE_TX | address);
|
||||
s.CSOn(); // CS Low
|
||||
s.send(SPI_WRITE_TX | address);
|
||||
|
||||
// Standard ID einstellen
|
||||
spi_putc((uint8_t) (p_message->id>>3));
|
||||
spi_putc((uint8_t) (p_message->id<<5));
|
||||
s.send((uint8_t) (p_message->id>>3));
|
||||
s.send((uint8_t) (p_message->id<<5));
|
||||
|
||||
// Extended ID
|
||||
spi_putc(0x00);
|
||||
spi_putc(0x00);
|
||||
s.send(0x00);
|
||||
s.send(0x00);
|
||||
|
||||
uint8_t length = p_message->length;
|
||||
|
||||
@ -238,32 +192,32 @@ uint8_t Can::can_send_message(CANMessage *p_message)
|
||||
aber enthaelt keine Daten */
|
||||
|
||||
// Nachrichten Laenge + RTR einstellen
|
||||
spi_putc((1<<RTR) | length);
|
||||
s.send((1<<RTR) | length);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nachrichten Laenge einstellen
|
||||
spi_putc(length);
|
||||
s.send(length);
|
||||
|
||||
// Daten
|
||||
for (uint8_t i=0;i<length;i++) {
|
||||
spi_putc(p_message->data[i]);
|
||||
s.send(p_message->data[i]);
|
||||
}
|
||||
}
|
||||
CANPORT_CS |= (1<<CANP_CS); // CS auf High
|
||||
s.CSOff(); // CS auf High
|
||||
|
||||
asm volatile ("nop");
|
||||
|
||||
/* CAN Nachricht verschicken
|
||||
die letzten drei Bit im RTS Kommando geben an welcher
|
||||
Puffer gesendet werden soll */
|
||||
CANPORT_CS &= ~(1<<CANP_CS); // CS wieder Low
|
||||
s.CSOn(); // CS wieder Low
|
||||
if (address == 0x00) {
|
||||
spi_putc(SPI_RTS | 0x01);
|
||||
s.send(SPI_RTS | 0x01);
|
||||
} else {
|
||||
spi_putc(SPI_RTS | address);
|
||||
s.send(SPI_RTS | address);
|
||||
}
|
||||
CANPORT_CS |= (1<<CANP_CS); // CS auf High
|
||||
s.CSOff(); // CS auf High
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -277,15 +231,15 @@ uint8_t Can::can_get_message(CANMessage *p_message)
|
||||
{
|
||||
// Nachricht in Puffer 0
|
||||
|
||||
CANPORT_CS &= ~(1<<CANP_CS); // CS Low
|
||||
spi_putc(SPI_READ_RX);
|
||||
s.CSOn(); // CS Low
|
||||
s.send(SPI_READ_RX);
|
||||
}
|
||||
else if (bit_is_set(status,7))
|
||||
{
|
||||
// Nachricht in Puffer 1
|
||||
|
||||
CANPORT_CS &= ~(1<<CANP_CS); // CS Low
|
||||
spi_putc(SPI_READ_RX | 0x04);
|
||||
s.CSOn(); // CS Low
|
||||
s.send(SPI_READ_RX | 0x04);
|
||||
}
|
||||
else {
|
||||
/* Fehler: Keine neue Nachricht vorhanden */
|
||||
@ -293,22 +247,22 @@ uint8_t Can::can_get_message(CANMessage *p_message)
|
||||
}
|
||||
|
||||
// Standard ID auslesen
|
||||
p_message->id = (uint16_t) spi_putc(0xff) << 3;
|
||||
p_message->id |= (uint16_t) spi_putc(0xff) >> 5;
|
||||
p_message->id = (uint16_t) s.send(0xff) << 3;
|
||||
p_message->id |= (uint16_t) s.send(0xff) >> 5;
|
||||
|
||||
spi_putc(0xff);
|
||||
spi_putc(0xff);
|
||||
s.send(0xff);
|
||||
s.send(0xff);
|
||||
|
||||
// Laenge auslesen
|
||||
uint8_t length = spi_putc(0xff) & 0x0f;
|
||||
uint8_t length = s.send(0xff) & 0x0f;
|
||||
p_message->length = length;
|
||||
|
||||
// Daten auslesen
|
||||
for (uint8_t i=0;i<length;i++) {
|
||||
p_message->data[i] = spi_putc(0xff);
|
||||
p_message->data[i] = s.send(0xff);
|
||||
}
|
||||
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
|
||||
if (bit_is_set(status,3)) {
|
||||
p_message->rtr = 1;
|
||||
@ -331,17 +285,17 @@ uint8_t Can::mcp2515_read_rx_status(void)
|
||||
uint8_t data;
|
||||
|
||||
// /CS des MCP2515 auf Low ziehen
|
||||
CANPORT_CS &= ~(1<<CANP_CS);
|
||||
s.CSOn();
|
||||
|
||||
spi_putc(SPI_RX_STATUS);
|
||||
data = spi_putc(0xff);
|
||||
s.send(SPI_RX_STATUS);
|
||||
data = s.send(0xff);
|
||||
|
||||
// Die Daten werden noch einmal wiederholt gesendet,
|
||||
// man braucht also nur eins der beiden Bytes auswerten.
|
||||
spi_putc(0xff);
|
||||
s.send(0xff);
|
||||
|
||||
// /CS Leitung wieder freigeben
|
||||
CANPORT_CS |= (1<<CANP_CS);
|
||||
s.CSOff();
|
||||
|
||||
return data;
|
||||
}
|
@ -10,6 +10,7 @@
|
||||
#include <util/delay.h>
|
||||
#include "mcp2515_defs.h"
|
||||
#include "Led.h"
|
||||
#include "Spi.h"
|
||||
|
||||
#ifndef CAN_H_
|
||||
#define CAN_H_
|
||||
@ -28,16 +29,15 @@ typedef struct
|
||||
|
||||
class Can {
|
||||
private:
|
||||
void init_spi();
|
||||
void init_can();
|
||||
void init_pin();
|
||||
uint8_t spi_putc( uint8_t data );
|
||||
void mcp2515_write_register( uint8_t adress, uint8_t data );
|
||||
uint8_t mcp2515_read_register(uint8_t adress);
|
||||
void mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data);
|
||||
uint8_t mcp2515_read_rx_status(void);
|
||||
Spi s;
|
||||
public:
|
||||
Can();
|
||||
Can(Spi spi);
|
||||
uint8_t can_send_message(CANMessage *p_message);
|
||||
uint8_t can_get_message(CANMessage *p_message);
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ Can.d Can.o: .././Can.cpp .././Can.h .././config.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \
|
||||
.././mcp2515_defs.h .././Led.h
|
||||
.././mcp2515_defs.h .././Led.h .././Spi.h
|
||||
|
||||
.././Can.h:
|
||||
|
||||
@ -50,3 +50,5 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-
|
||||
.././mcp2515_defs.h:
|
||||
|
||||
.././Led.h:
|
||||
|
||||
.././Spi.h:
|
||||
|
@ -18,7 +18,7 @@ Mainboard.d Mainboard.o: .././Mainboard.cpp .././config.h .././Led.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \
|
||||
.././mcp2515_defs.h
|
||||
.././mcp2515_defs.h .././Spi.h
|
||||
|
||||
.././config.h:
|
||||
|
||||
@ -63,3 +63,5 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h:
|
||||
|
||||
.././mcp2515_defs.h:
|
||||
|
||||
.././Spi.h:
|
||||
|
Binary file not shown.
@ -5,80 +5,94 @@
|
||||
:100040000C9463000C9463000C9463000C946300A4
|
||||
:100050000C9463000C9463000C9463000C94630094
|
||||
:100060000C9463000C9463000C9463000C94630084
|
||||
:100070000C9463004B0211241FBECFEFD4E0DEBF0F
|
||||
:10008000CDBF11E0A0E0B1E0EAE1F5E002C00590EB
|
||||
:100070000C9463005E0211241FBECFEFD4E0DEBFFC
|
||||
:10008000CDBF11E0A0E0B1E0EAEFF5E002C00590DD
|
||||
:100090000D92A630B107D9F721E0A6E0B1E001C08A
|
||||
:1000A0001D92A930B207E1F710E0C6E7D0E004C026
|
||||
:1000B0002297FE010E948702C437D107C9F70E9428
|
||||
:1000C000F9010C948B020C940000CF93DF9300D0C5
|
||||
:1000D000CDB7DEB76EBD65E0CE0102960E94EF019E
|
||||
:1000E0000DB407FEFDCF60E0CE0101960E94EF0146
|
||||
:1000F0008EB50F900F90DF91CF91089584B18660F7
|
||||
:1001000084B985B1817F85B9249A2C9A089580E5B8
|
||||
:100110008CBD81E08DBD08950F931F93CF93DF9326
|
||||
:10012000EC01062F142F2C9862E00E946500602FCE
|
||||
:10013000CE010E946500612FCE010E9465002C9ABD
|
||||
:10014000DF91CF911F910F910895CF93DF93EC0131
|
||||
:100150002C9860EC0E9465008FE99FE00197F1F711
|
||||
:1001600000C000002C9A8FE39CE90197F1F700C0D2
|
||||
:10017000000047E06AE2CE010E948C0040E969E29B
|
||||
:10018000CE010E948C0042E068E2CE010E948C0009
|
||||
:1001900043E06BE2CE010E948C0040E660E6CE01B7
|
||||
:1001A0000E948C0040E660E7CE010E948C0040E097
|
||||
:1001B00060E2CE010E948C0040E061E2CE010E942C
|
||||
:1001C0008C0040E062E2CE010E948C0040E063E2DD
|
||||
:1001D000CE010E948C0040E064E2CE010E948C00BF
|
||||
:1001E00040E065E2CE010E948C0040E066E2CE0174
|
||||
:1001F0000E948C0040E067E2CE010E948C0040E04B
|
||||
:100200006CE0CE010E948C00DF91CF910895CF93D6
|
||||
:10021000DF93EC018FE39CE90197F1F700C0000048
|
||||
:10022000CE010E947E00CE010E948700CE010E9476
|
||||
:10023000A500DF91CF910895FF920F931F93CF9365
|
||||
:10024000DF93EC01F62E042F122F2C9865E00E940C
|
||||
:1002500065006F2DCE010E946500602FCE010E94C7
|
||||
:100260006500612FCE010E9465002C9ADF91CF912D
|
||||
:100270001F910F91FF9008951F93CF93DF93EC018F
|
||||
:100280002C9860EB0E9465006FEFCE010E94650024
|
||||
:10029000182F6FEFCE010E9465002C9A812FDF91FD
|
||||
:1002A000CF911F910895AF92BF92CF92DF92EF92BC
|
||||
:1002B000FF920F931F93CF93DF931F92CDB7DEB7BB
|
||||
:1002C0007C016B010E943C018983898186FF06C005
|
||||
:1002D0002C9860E9C7010E94650009C089818823C4
|
||||
:1002E0000CF069C02C9864E9C7010E9465006FEFAB
|
||||
:1002F000C7010E94650090E0880F991F880F991F21
|
||||
:10030000880F991FF601918380836FEFC7010E94C8
|
||||
:10031000650090E096958795929582958F708927D4
|
||||
:100320009F708927F60120813181822B932B918345
|
||||
:1003300080836FEFC7010E9465006FEFC7010E94C5
|
||||
:1003400065006FEFC7010E9465008F70F60183831F
|
||||
:100350008823A1F086010C5F1F4F5601F5E0AF0E18
|
||||
:10036000B11C8150A80EB11C6FEFC7010E9465003F
|
||||
:10037000F80181938F01EA15FB05B1F72C9A898169
|
||||
:1003800083FF04C081E0F601828302C0F60112827D
|
||||
:10039000898186FF07C020E041E06CE2C7010E942E
|
||||
:1003A0001C0106C020E042E06CE2C7010E941C0173
|
||||
:1003B0008981877001C08FEF0F90DF91CF911F91DE
|
||||
:1003C0000F91FF90EF90DF90CF90BF90AF90089586
|
||||
:1003D00084B1806E84B908950E94E801089585B1C2
|
||||
:1003E0008F7185B985B16295660F607E682B65B99E
|
||||
:1003F0000895CF93DF93CDB7DEB72C970FB6F8945F
|
||||
:10040000DEBF0FBECDBF66E088E091E00E94EF0145
|
||||
:1004100060E071E087E091E00E94700283E291E089
|
||||
:100420009A8389831B8282E08C838FEA8D838EEF8F
|
||||
:100430008E8362E088E091E00E94EF012FEF83ED70
|
||||
:1004400090E3215080409040E1F700C00000BE01E1
|
||||
:100450006F5F7F4F86E091E00E9453018F3F61F410
|
||||
:1004600064E088E091E00E94EF018FE39CE901974E
|
||||
:10047000F1F700C00000DDCF61E088E091E00E946C
|
||||
:10048000EF019FEF23ED80E3915020408040E1F7A2
|
||||
:1004900000C00000CECF88E091E00E94EC0187E030
|
||||
:1004A00091E00E946D0286E091E00E9407010895AC
|
||||
:1004B000E8ECF0E0808185FFFDCF6093CE0080E026
|
||||
:1004C000089586E08093CA00E9ECF0E080818860BE
|
||||
:1004D000808387E68093CC0008950E94610208958E
|
||||
:1004E0000F931F93CF93DF938C01EB0168816623F9
|
||||
:1004F00039F02196C8010E94580269916111FACF22
|
||||
:10050000DF91CF911F910F910895EE0FFF1F05907E
|
||||
:0A051000F491E02D0994F894FFCF58
|
||||
:06051A00626C610A0000A2
|
||||
:1000A0001D92AB30B207E1F710E0C6E7D0E004C024
|
||||
:1000B0002297FE010E94F702C437D107C9F70E94B8
|
||||
:1000C00009020C94FB020C940000FF920F931F9303
|
||||
:1000D000CF93DF931F92CDB7DEB7F82E092F162FDF
|
||||
:1000E00049830E94C40262E08F2D902F0E94E90292
|
||||
:1000F000612F8F2D902F0E94E9024981642F8F2D4F
|
||||
:10010000902F0E94E9028F2D902F0F90DF91CF91B9
|
||||
:100110001F910F91FF900C94C202CF93DF93D82FC1
|
||||
:10012000C92F0E94C40260EC8D2F9C2F0E94E9020F
|
||||
:100130008FE99FE00197F1F700C000008D2F9C2F01
|
||||
:100140000E94C2028FE39CE90197F1F700C0000012
|
||||
:1001500047E06AE28D2F9C2F0E94650040E969E22A
|
||||
:100160008D2F9C2F0E94650042E068E28D2F9C2F0E
|
||||
:100170000E94650043E06BE28D2F9C2F0E9465007A
|
||||
:1001800040E660E68D2F9C2F0E94650040E660E708
|
||||
:100190008D2F9C2F0E94650040E060E28D2F9C2FE8
|
||||
:1001A0000E94650040E061E28D2F9C2F0E94650057
|
||||
:1001B00040E062E28D2F9C2F0E94650040E063E2E8
|
||||
:1001C0008D2F9C2F0E94650040E064E28D2F9C2FB4
|
||||
:1001D0000E94650040E065E28D2F9C2F0E94650023
|
||||
:1001E00040E066E28D2F9C2F0E94650040E067E2B0
|
||||
:1001F0008D2F9C2F0E94650040E06CE08D2F9C2F7E
|
||||
:10020000DF91CF910C946500FC01408351836283A0
|
||||
:100210000C948D00FF920F931F93CF93DF9300D028
|
||||
:10022000CDB7DEB7F82E092F162F2A8349830E94F7
|
||||
:10023000C40265E08F2D902F0E94E902612F8F2D5F
|
||||
:10024000902F0E94E9024981642F8F2D902F0E94E8
|
||||
:10025000E9022A81622F8F2D902F0E94E9028F2DB3
|
||||
:10026000902F0F900F90DF91CF911F910F91FF90E2
|
||||
:100270000C94C2021F93CF93DF93D82FC92F0E94F3
|
||||
:10028000C40260EB8D2F9C2F0E94E9026FEF8D2F2F
|
||||
:100290009C2F0E94E902182F6FEF8D2F9C2F0E9438
|
||||
:1002A000E9028D2F9C2F0E94C202812FDF91CF91F6
|
||||
:1002B0001F9108959F92AF92BF92CF92DF92EF92DB
|
||||
:1002C000FF920F931F93CF93DF931F92CDB7DEB7AB
|
||||
:1002D0005C016B010E943A01982E8983898186FD19
|
||||
:1002E00011C0898187FD7FC08FEF0F90DF91CF9183
|
||||
:1002F0001F910F91FF90EF90DF90CF90BF90AF9044
|
||||
:100300009F900895C5010E94C40260E9C5010E9442
|
||||
:10031000E9026FEFC5010E94E902282F30E0220FA9
|
||||
:10032000331F220F331F220F331FF6013183208327
|
||||
:100330006FEFC5010E94E902482F50E0569547959E
|
||||
:10034000529542954F7045275F704527F6012081F1
|
||||
:100350003181242B352B318320836FEFC5010E941F
|
||||
:10036000E9026FEFC5010E94E9026FEFC5010E942B
|
||||
:10037000E9028F70F60183838823A1F086010C5F68
|
||||
:100380001F4F7601F5E0EF0EF11C8150E80EF11CD5
|
||||
:100390006FEFC5010E94E902F80181938F01EE150C
|
||||
:1003A000FF05B1F7C5010E94C202898183FD0EC01D
|
||||
:1003B000F6011282898120E086FF0FC041E06CE2E5
|
||||
:1003C000C5010E940A01892D87708FCF81E0F60157
|
||||
:1003D0008283898120E086FDF1CF42E06CE2C50195
|
||||
:1003E0000E940A01F0CFC5010E94C40264E9C50160
|
||||
:1003F0000E94E9028ECF84B1806E84B9089585B1E0
|
||||
:100400008F7185B985B16295660F607E682B65B97D
|
||||
:100410000895CF93DF93CDB7DEB72C970FB6F8943E
|
||||
:10042000DEBF0FBECDBF66E08AE091E00E94FF0113
|
||||
:1004300060E071E089E091E00E948A0283E291E04D
|
||||
:100440009A8389831B8282E08C838FEA8D838EEF6F
|
||||
:100450008E830EC061E08AE091E00E94FF012FEFE1
|
||||
:1004600083ED90E3215080409040E1F700C0000010
|
||||
:1004700062E08AE091E00E94FF012FEF81EE94E0BC
|
||||
:10048000215080409040E1F700C00000BE016F5F46
|
||||
:100490007F4F86E091E00E945A018F3FD9F664E0D9
|
||||
:1004A0008AE091E00E94FF012FEF81EE94E021505D
|
||||
:1004B00080409040E1F700C00000DACFCF93DF9397
|
||||
:1004C00000D01F92CDB7DEB78AE091E00E94FB0119
|
||||
:1004D00089E091E00E947E0260E0CE0101960E94D8
|
||||
:1004E000B90249815A816B8186E091E00E94040142
|
||||
:1004F0000F900F900F90DF91CF91089586E0809339
|
||||
:10050000CA00E9ECF0E080818860808387E6809310
|
||||
:10051000CC000895FB019081992351F03196809190
|
||||
:10052000C80085FFFCCF9093CE0091919111F7CF39
|
||||
:10053000089524B1266124B9239825B1217F25B9D6
|
||||
:10054000DC011196ED91FC9112978081817F80836F
|
||||
:100550002C9A0895CF93DF93EC010E949902888131
|
||||
:10056000811104C080E58CBD81E08DBDDF91CF910C
|
||||
:10057000089521E0FC01208325E230E032832183CD
|
||||
:100580000C94AA022C9A08952C98089598E080E083
|
||||
:1005900060FD2A9A60FF2A9829986695000000005D
|
||||
:1005A000000000000000000000000000000000004B
|
||||
:1005B000000000000000000000000000299A000078
|
||||
:1005C00023B123FB222720F9880F822B915001F7BA
|
||||
:1005D0000895FC012081211106C06EBD0DB407FEF7
|
||||
:1005E000FDCF8EB508950C94C602EE0FFF1F059047
|
||||
:0A05F000F491E02D0994F894FFCF78
|
||||
:0605FA00626C610A0000C2
|
||||
:00000001FF
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,20 +17,32 @@ Discarded input sections
|
||||
.text 0x00000000 0x0 Can.o
|
||||
.bss 0x00000000 0x0 Can.o
|
||||
.text._ZN3Can21mcp2515_read_registerEh
|
||||
0x00000000 0x2c Can.o
|
||||
0x00000000 0x42 Can.o
|
||||
.text._ZN3Can16can_send_messageEP10CANMessage
|
||||
0x00000000 0x138 Can.o
|
||||
0x00000000 0x154 Can.o
|
||||
.text 0x00000000 0x0 Led.o
|
||||
.bss 0x00000000 0x0 Led.o
|
||||
.text._ZN3Led4initEv
|
||||
0x00000000 0x8 Led.o
|
||||
.text._ZN3Led6uninitEv
|
||||
0x00000000 0x2 Led.o
|
||||
.text._ZN3Led4fadeEiii
|
||||
0x00000000 0xbc Led.o
|
||||
0x00000000 0x68 Led.o
|
||||
.text._ZN3Led7rainbowEh
|
||||
0x00000000 0x7c Led.o
|
||||
0x00000000 0x7a Led.o
|
||||
.text 0x00000000 0x0 Mainboard.o
|
||||
.text 0x00000000 0x0 Rs232.o
|
||||
.bss 0x00000000 0x0 Rs232.o
|
||||
.text._ZN5Rs23212uart_putcharEh
|
||||
0x00000000 0x10 Rs232.o
|
||||
.text._ZN5Rs2324initEv
|
||||
0x00000000 0x18 Rs232.o
|
||||
.text 0x00000000 0x0 Spi.o
|
||||
.bss 0x00000000 0x0 Spi.o
|
||||
.text._ZN3Spi8init_spiEv
|
||||
0x00000000 0xa Spi.o
|
||||
.text._ZN3Spi9send_hardEh
|
||||
0x00000000 0xc Spi.o
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
.text.libgcc.mul
|
||||
@ -116,6 +128,7 @@ LOAD Can.o
|
||||
LOAD Led.o
|
||||
LOAD Mainboard.o
|
||||
LOAD Rs232.o
|
||||
LOAD Spi.o
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libm.a
|
||||
END GROUP
|
||||
@ -215,7 +228,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
.rela.plt
|
||||
*(.rela.plt)
|
||||
|
||||
.text 0x00000000 0x51a
|
||||
.text 0x00000000 0x5fa
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x74 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o
|
||||
0x00000000 __vector_default
|
||||
@ -305,69 +318,74 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
0x000000c6 __vector_20
|
||||
0x000000ca . = ALIGN (0x2)
|
||||
*(.text.*)
|
||||
.text._ZN3Can8spi_putcEh
|
||||
0x000000ca 0x32 Can.o
|
||||
0x000000ca _ZN3Can8spi_putcEh
|
||||
.text._ZN3Can8init_pinEv
|
||||
0x000000fc 0x12 Can.o
|
||||
0x000000fc _ZN3Can8init_pinEv
|
||||
.text._ZN3Can8init_spiEv
|
||||
0x0000010e 0xa Can.o
|
||||
0x0000010e _ZN3Can8init_spiEv
|
||||
.text._ZN3Can22mcp2515_write_registerEhh
|
||||
0x00000118 0x32 Can.o
|
||||
0x00000118 _ZN3Can22mcp2515_write_registerEhh
|
||||
0x000000ca 0x50 Can.o
|
||||
0x000000ca _ZN3Can22mcp2515_write_registerEhh
|
||||
.text._ZN3Can8init_canEv
|
||||
0x0000014a 0xc4 Can.o
|
||||
0x0000014a _ZN3Can8init_canEv
|
||||
.text._ZN3CanC2Ev
|
||||
0x0000020e 0x2a Can.o
|
||||
0x0000020e _ZN3CanC2Ev
|
||||
0x0000020e _ZN3CanC1Ev
|
||||
0x0000011a 0xee Can.o
|
||||
0x0000011a _ZN3Can8init_canEv
|
||||
.text._ZN3CanC2E3Spi
|
||||
0x00000208 0xc Can.o
|
||||
0x00000208 _ZN3CanC2E3Spi
|
||||
0x00000208 _ZN3CanC1E3Spi
|
||||
.text._ZN3Can18mcp2515_bit_modifyEhhh
|
||||
0x00000238 0x40 Can.o
|
||||
0x00000238 _ZN3Can18mcp2515_bit_modifyEhhh
|
||||
0x00000214 0x60 Can.o
|
||||
0x00000214 _ZN3Can18mcp2515_bit_modifyEhhh
|
||||
.text._ZN3Can22mcp2515_read_rx_statusEv
|
||||
0x00000278 0x2e Can.o
|
||||
0x00000278 _ZN3Can22mcp2515_read_rx_statusEv
|
||||
0x00000274 0x40 Can.o
|
||||
0x00000274 _ZN3Can22mcp2515_read_rx_statusEv
|
||||
.text._ZN3Can15can_get_messageEP10CANMessage
|
||||
0x000002a6 0x12a Can.o
|
||||
0x000002a6 _ZN3Can15can_get_messageEP10CANMessage
|
||||
.text._ZN3Led4initEv
|
||||
0x000003d0 0x8 Led.o
|
||||
0x000003d0 _ZN3Led4initEv
|
||||
0x000002b4 0x142 Can.o
|
||||
0x000002b4 _ZN3Can15can_get_messageEP10CANMessage
|
||||
.text._ZN3LedC2Ev
|
||||
0x000003d8 0x6 Led.o
|
||||
0x000003d8 _ZN3LedC1Ev
|
||||
0x000003d8 _ZN3LedC2Ev
|
||||
0x000003f6 0x8 Led.o
|
||||
0x000003f6 _ZN3LedC1Ev
|
||||
0x000003f6 _ZN3LedC2Ev
|
||||
.text._ZN3Led5colorEh
|
||||
0x000003de 0x14 Led.o
|
||||
0x000003de _ZN3Led5colorEh
|
||||
.text.main 0x000003f2 0xa4 Mainboard.o
|
||||
0x000003f2 main
|
||||
.text._GLOBAL__sub_I_l
|
||||
0x00000496 0x1a Mainboard.o
|
||||
.text._ZN5Rs23212uart_putcharEh
|
||||
0x000004b0 0x12 Rs232.o
|
||||
0x000004b0 _ZN5Rs23212uart_putcharEh
|
||||
.text._ZN5Rs2324initEv
|
||||
0x000004c2 0x18 Rs232.o
|
||||
0x000004c2 _ZN5Rs2324initEv
|
||||
0x000003fe 0x14 Led.o
|
||||
0x000003fe _ZN3Led5colorEh
|
||||
.text.startup.main
|
||||
0x00000412 0xaa Mainboard.o
|
||||
0x00000412 main
|
||||
.text.startup._GLOBAL__sub_I_l
|
||||
0x000004bc 0x40 Mainboard.o
|
||||
.text._ZN5Rs232C2Ev
|
||||
0x000004da 0x6 Rs232.o
|
||||
0x000004da _ZN5Rs232C2Ev
|
||||
0x000004da _ZN5Rs232C1Ev
|
||||
.text._ZN5Rs2324sendEPc
|
||||
0x000004e0 0x2a Rs232.o
|
||||
0x000004e0 _ZN5Rs2324sendEPc
|
||||
.text.libgcc 0x0000050a 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o)
|
||||
0x0000050a __tablejump2__
|
||||
0x0000050e __tablejump__
|
||||
0x00000516 . = ALIGN (0x2)
|
||||
0x000004fc 0x18 Rs232.o
|
||||
0x000004fc _ZN5Rs232C2Ev
|
||||
0x000004fc _ZN5Rs232C1Ev
|
||||
.text._ZN5Rs2324sendEPKc
|
||||
0x00000514 0x1e Rs232.o
|
||||
0x00000514 _ZN5Rs2324sendEPKc
|
||||
.text._ZN3Spi9init_portEv
|
||||
0x00000532 0x22 Spi.o
|
||||
0x00000532 _ZN3Spi9init_portEv
|
||||
.text._ZN3Spi4initEv
|
||||
0x00000554 0x1e Spi.o
|
||||
0x00000554 _ZN3Spi4initEv
|
||||
.text._ZN3SpiC2Eh
|
||||
0x00000572 0x12 Spi.o
|
||||
0x00000572 _ZN3SpiC1Eh
|
||||
0x00000572 _ZN3SpiC2Eh
|
||||
.text._ZN3Spi5CSOffEv
|
||||
0x00000584 0x4 Spi.o
|
||||
0x00000584 _ZN3Spi5CSOffEv
|
||||
.text._ZN3Spi4CSOnEv
|
||||
0x00000588 0x4 Spi.o
|
||||
0x00000588 _ZN3Spi4CSOnEv
|
||||
.text._ZN3Spi9send_softEh
|
||||
0x0000058c 0x46 Spi.o
|
||||
0x0000058c _ZN3Spi9send_softEh
|
||||
.text._ZN3Spi4sendEh
|
||||
0x000005d2 0x18 Spi.o
|
||||
0x000005d2 _ZN3Spi4sendEh
|
||||
.text.libgcc 0x000005ea 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o)
|
||||
0x000005ea __tablejump2__
|
||||
0x000005ee __tablejump__
|
||||
0x000005f6 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x00000516 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
0x00000516 _exit
|
||||
0x00000516 exit
|
||||
.fini9 0x000005f6 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
0x000005f6 _exit
|
||||
0x000005f6 exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
@ -386,11 +404,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x00000516 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
.fini0 0x000005f6 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
*(.fini0)
|
||||
0x0000051a _etext = .
|
||||
0x000005fa _etext = .
|
||||
|
||||
.data 0x00800100 0x6 load address 0x0000051a
|
||||
.data 0x00800100 0x6 load address 0x000005fa
|
||||
0x00800100 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
.data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o
|
||||
@ -398,6 +416,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
.data 0x00800100 0x0 Led.o
|
||||
.data 0x00800100 0x0 Mainboard.o
|
||||
.data 0x00800100 0x0 Rs232.o
|
||||
.data 0x00800100 0x0 Spi.o
|
||||
.data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o)
|
||||
.data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o)
|
||||
.data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o)
|
||||
@ -414,25 +433,25 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
0x00800106 _edata = .
|
||||
0x00800106 PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x00800106 0x3
|
||||
.bss 0x00800106 0x5
|
||||
0x00800106 PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
.bss 0x00800106 0x3 Mainboard.o
|
||||
.bss 0x00800106 0x5 Mainboard.o
|
||||
0x00800106 c
|
||||
0x00800107 r
|
||||
0x00800108 l
|
||||
0x00800109 r
|
||||
0x0080010a l
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
0x00800109 PROVIDE (__bss_end, .)
|
||||
0x0000051a __data_load_start = LOADADDR (.data)
|
||||
0x00000520 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
0x0080010b PROVIDE (__bss_end, .)
|
||||
0x000005fa __data_load_start = LOADADDR (.data)
|
||||
0x00000600 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x00800109 0x0
|
||||
0x00800109 PROVIDE (__noinit_start, .)
|
||||
.noinit 0x0080010b 0x0
|
||||
0x0080010b PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
0x00800109 PROVIDE (__noinit_end, .)
|
||||
0x00800109 _end = .
|
||||
0x00800109 PROVIDE (__heap_start, .)
|
||||
0x0080010b PROVIDE (__noinit_end, .)
|
||||
0x0080010b _end = .
|
||||
0x0080010b PROVIDE (__heap_start, .)
|
||||
|
||||
.eeprom 0x00810000 0x0
|
||||
*(.eeprom*)
|
||||
@ -480,6 +499,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
.comment 0x00000000 0x30 Led.o
|
||||
.comment 0x00000000 0x30 Mainboard.o
|
||||
.comment 0x00000000 0x30 Rs232.o
|
||||
.comment 0x00000000 0x30 Spi.o
|
||||
|
||||
.debug
|
||||
*(.debug)
|
||||
@ -493,66 +513,75 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
.debug_sfnames
|
||||
*(.debug_sfnames)
|
||||
|
||||
.debug_aranges 0x00000000 0x118
|
||||
.debug_aranges 0x00000000 0x160
|
||||
*(.debug_aranges)
|
||||
.debug_aranges
|
||||
0x00000000 0x70 Can.o
|
||||
0x00000000 0x58 Can.o
|
||||
.debug_aranges
|
||||
0x00000070 0x48 Led.o
|
||||
0x00000058 0x48 Led.o
|
||||
.debug_aranges
|
||||
0x000000b8 0x28 Mainboard.o
|
||||
0x000000a0 0x28 Mainboard.o
|
||||
.debug_aranges
|
||||
0x000000e0 0x38 Rs232.o
|
||||
0x000000c8 0x38 Rs232.o
|
||||
.debug_aranges
|
||||
0x00000100 0x60 Spi.o
|
||||
|
||||
.debug_pubnames
|
||||
*(.debug_pubnames)
|
||||
|
||||
.debug_info 0x00000000 0x1e0f
|
||||
.debug_info 0x00000000 0x233b
|
||||
*(.debug_info)
|
||||
.debug_info 0x00000000 0xf5f Can.o
|
||||
.debug_info 0x00000f5f 0x4f8 Led.o
|
||||
.debug_info 0x00001457 0x781 Mainboard.o
|
||||
.debug_info 0x00001bd8 0x237 Rs232.o
|
||||
.debug_info 0x00000000 0xdff Can.o
|
||||
.debug_info 0x00000dff 0x564 Led.o
|
||||
.debug_info 0x00001363 0x8d5 Mainboard.o
|
||||
.debug_info 0x00001c38 0x27a Rs232.o
|
||||
.debug_info 0x00001eb2 0x489 Spi.o
|
||||
*(.gnu.linkonce.wi.*)
|
||||
|
||||
.debug_abbrev 0x00000000 0x99e
|
||||
.debug_abbrev 0x00000000 0xc52
|
||||
*(.debug_abbrev)
|
||||
.debug_abbrev 0x00000000 0x34a Can.o
|
||||
.debug_abbrev 0x0000034a 0x1eb Led.o
|
||||
.debug_abbrev 0x00000535 0x2fc Mainboard.o
|
||||
.debug_abbrev 0x00000831 0x16d Rs232.o
|
||||
.debug_abbrev 0x00000000 0x350 Can.o
|
||||
.debug_abbrev 0x00000350 0x22c Led.o
|
||||
.debug_abbrev 0x0000057c 0x33d Mainboard.o
|
||||
.debug_abbrev 0x000008b9 0x15b Rs232.o
|
||||
.debug_abbrev 0x00000a14 0x23e Spi.o
|
||||
|
||||
.debug_line 0x00000000 0x72a
|
||||
.debug_line 0x00000000 0x8ce
|
||||
*(.debug_line)
|
||||
.debug_line 0x00000000 0x2e1 Can.o
|
||||
.debug_line 0x000002e1 0x162 Led.o
|
||||
.debug_line 0x00000443 0x1ca Mainboard.o
|
||||
.debug_line 0x0000060d 0x11d Rs232.o
|
||||
.debug_line 0x00000000 0x2b3 Can.o
|
||||
.debug_line 0x000002b3 0x16e Led.o
|
||||
.debug_line 0x00000421 0x1d8 Mainboard.o
|
||||
.debug_line 0x000005f9 0x122 Rs232.o
|
||||
.debug_line 0x0000071b 0x1b3 Spi.o
|
||||
|
||||
.debug_frame 0x00000000 0x338
|
||||
.debug_frame 0x00000000 0x35c
|
||||
*(.debug_frame)
|
||||
.debug_frame 0x00000000 0x1ac Can.o
|
||||
.debug_frame 0x000001ac 0xe0 Led.o
|
||||
.debug_frame 0x0000028c 0x44 Mainboard.o
|
||||
.debug_frame 0x000002d0 0x68 Rs232.o
|
||||
.debug_frame 0x00000000 0x180 Can.o
|
||||
.debug_frame 0x00000180 0x84 Led.o
|
||||
.debug_frame 0x00000204 0x54 Mainboard.o
|
||||
.debug_frame 0x00000258 0x54 Rs232.o
|
||||
.debug_frame 0x000002ac 0xb0 Spi.o
|
||||
|
||||
.debug_str 0x00000000 0x490
|
||||
.debug_str 0x00000000 0x54c
|
||||
*(.debug_str)
|
||||
.debug_str 0x00000000 0x389 Can.o
|
||||
0x3e1 (size before relaxing)
|
||||
.debug_str 0x00000389 0x23 Led.o
|
||||
.debug_str 0x00000000 0x38c Can.o
|
||||
0x3e4 (size before relaxing)
|
||||
.debug_str 0x0000038c 0xbb Led.o
|
||||
0x185 (size before relaxing)
|
||||
.debug_str 0x000003ac 0xc2 Mainboard.o
|
||||
0x465 (size before relaxing)
|
||||
.debug_str 0x0000046e 0x22 Rs232.o
|
||||
0x14a (size before relaxing)
|
||||
.debug_str 0x00000447 0xbe Mainboard.o
|
||||
0x4f9 (size before relaxing)
|
||||
.debug_str 0x00000505 0x22 Rs232.o
|
||||
0x14b (size before relaxing)
|
||||
.debug_str 0x00000527 0x25 Spi.o
|
||||
0x1c8 (size before relaxing)
|
||||
|
||||
.debug_loc 0x00000000 0xd47
|
||||
.debug_loc 0x00000000 0xdbb
|
||||
*(.debug_loc)
|
||||
.debug_loc 0x00000000 0x796 Can.o
|
||||
.debug_loc 0x00000796 0x3eb Led.o
|
||||
.debug_loc 0x00000b81 0xad Mainboard.o
|
||||
.debug_loc 0x00000c2e 0x119 Rs232.o
|
||||
.debug_loc 0x00000000 0x6f2 Can.o
|
||||
.debug_loc 0x000006f2 0x2c1 Led.o
|
||||
.debug_loc 0x000009b3 0x16d Mainboard.o
|
||||
.debug_loc 0x00000b20 0x8a Rs232.o
|
||||
.debug_loc 0x00000baa 0x211 Spi.o
|
||||
|
||||
.debug_macinfo
|
||||
*(.debug_macinfo)
|
||||
@ -560,12 +589,13 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
|
||||
.debug_pubtypes
|
||||
*(.debug_pubtypes)
|
||||
|
||||
.debug_ranges 0x00000000 0x120
|
||||
.debug_ranges 0x00000000 0x188
|
||||
*(.debug_ranges)
|
||||
.debug_ranges 0x00000000 0x60 Can.o
|
||||
.debug_ranges 0x00000060 0x80 Led.o
|
||||
.debug_ranges 0x000000e0 0x18 Mainboard.o
|
||||
.debug_ranges 0x000000f8 0x28 Rs232.o
|
||||
.debug_ranges 0x00000000 0x90 Can.o
|
||||
.debug_ranges 0x00000090 0x68 Led.o
|
||||
.debug_ranges 0x000000f8 0x18 Mainboard.o
|
||||
.debug_ranges 0x00000110 0x28 Rs232.o
|
||||
.debug_ranges 0x00000138 0x50 Spi.o
|
||||
|
||||
.debug_macro
|
||||
*(.debug_macro)
|
||||
|
@ -6,80 +6,94 @@ S11300300C9463000C9463000C9463000C946300B0
|
||||
S11300400C9463000C9463000C9463000C946300A0
|
||||
S11300500C9463000C9463000C9463000C94630090
|
||||
S11300600C9463000C9463000C9463000C94630080
|
||||
S11300700C9463004B0211241FBECFEFD4E0DEBF0B
|
||||
S1130080CDBF11E0A0E0B1E0EAE1F5E002C00590E7
|
||||
S11300700C9463005E0211241FBECFEFD4E0DEBFF8
|
||||
S1130080CDBF11E0A0E0B1E0EAEFF5E002C00590D9
|
||||
S11300900D92A630B107D9F721E0A6E0B1E001C086
|
||||
S11300A01D92A930B207E1F710E0C6E7D0E004C022
|
||||
S11300B02297FE010E948702C437D107C9F70E9424
|
||||
S11300C0F9010C948B020C940000CF93DF9300D0C1
|
||||
S11300D0CDB7DEB76EBD65E0CE0102960E94EF019A
|
||||
S11300E00DB407FEFDCF60E0CE0101960E94EF0142
|
||||
S11300F08EB50F900F90DF91CF91089584B18660F3
|
||||
S113010084B985B1817F85B9249A2C9A089580E5B4
|
||||
S11301108CBD81E08DBD08950F931F93CF93DF9322
|
||||
S1130120EC01062F142F2C9862E00E946500602FCA
|
||||
S1130130CE010E946500612FCE010E9465002C9AB9
|
||||
S1130140DF91CF911F910F910895CF93DF93EC012D
|
||||
S11301502C9860EC0E9465008FE99FE00197F1F70D
|
||||
S113016000C000002C9A8FE39CE90197F1F700C0CE
|
||||
S1130170000047E06AE2CE010E948C0040E969E297
|
||||
S1130180CE010E948C0042E068E2CE010E948C0005
|
||||
S113019043E06BE2CE010E948C0040E660E6CE01B3
|
||||
S11301A00E948C0040E660E7CE010E948C0040E093
|
||||
S11301B060E2CE010E948C0040E061E2CE010E9428
|
||||
S11301C08C0040E062E2CE010E948C0040E063E2D9
|
||||
S11301D0CE010E948C0040E064E2CE010E948C00BB
|
||||
S11301E040E065E2CE010E948C0040E066E2CE0170
|
||||
S11301F00E948C0040E067E2CE010E948C0040E047
|
||||
S11302006CE0CE010E948C00DF91CF910895CF93D2
|
||||
S1130210DF93EC018FE39CE90197F1F700C0000044
|
||||
S1130220CE010E947E00CE010E948700CE010E9472
|
||||
S1130230A500DF91CF910895FF920F931F93CF9361
|
||||
S1130240DF93EC01F62E042F122F2C9865E00E9408
|
||||
S113025065006F2DCE010E946500602FCE010E94C3
|
||||
S11302606500612FCE010E9465002C9ADF91CF9129
|
||||
S11302701F910F91FF9008951F93CF93DF93EC018B
|
||||
S11302802C9860EB0E9465006FEFCE010E94650020
|
||||
S1130290182F6FEFCE010E9465002C9A812FDF91F9
|
||||
S11302A0CF911F910895AF92BF92CF92DF92EF92B8
|
||||
S11302B0FF920F931F93CF93DF931F92CDB7DEB7B7
|
||||
S11302C07C016B010E943C018983898186FF06C001
|
||||
S11302D02C9860E9C7010E94650009C089818823C0
|
||||
S11302E00CF069C02C9864E9C7010E9465006FEFA7
|
||||
S11302F0C7010E94650090E0880F991F880F991F1D
|
||||
S1130300880F991FF601918380836FEFC7010E94C4
|
||||
S1130310650090E096958795929582958F708927D0
|
||||
S11303209F708927F60120813181822B932B918341
|
||||
S113033080836FEFC7010E9465006FEFC7010E94C1
|
||||
S113034065006FEFC7010E9465008F70F60183831B
|
||||
S11303508823A1F086010C5F1F4F5601F5E0AF0E14
|
||||
S1130360B11C8150A80EB11C6FEFC7010E9465003B
|
||||
S1130370F80181938F01EA15FB05B1F72C9A898165
|
||||
S113038083FF04C081E0F601828302C0F601128279
|
||||
S1130390898186FF07C020E041E06CE2C7010E942A
|
||||
S11303A01C0106C020E042E06CE2C7010E941C016F
|
||||
S11303B08981877001C08FEF0F90DF91CF911F91DA
|
||||
S11303C00F91FF90EF90DF90CF90BF90AF90089582
|
||||
S11303D084B1806E84B908950E94E801089585B1BE
|
||||
S11303E08F7185B985B16295660F607E682B65B99A
|
||||
S11303F00895CF93DF93CDB7DEB72C970FB6F8945B
|
||||
S1130400DEBF0FBECDBF66E088E091E00E94EF0141
|
||||
S113041060E071E087E091E00E94700283E291E085
|
||||
S11304209A8389831B8282E08C838FEA8D838EEF8B
|
||||
S11304308E8362E088E091E00E94EF012FEF83ED6C
|
||||
S113044090E3215080409040E1F700C00000BE01DD
|
||||
S11304506F5F7F4F86E091E00E9453018F3F61F40C
|
||||
S113046064E088E091E00E94EF018FE39CE901974A
|
||||
S1130470F1F700C00000DDCF61E088E091E00E9468
|
||||
S1130480EF019FEF23ED80E3915020408040E1F79E
|
||||
S113049000C00000CECF88E091E00E94EC0187E02C
|
||||
S11304A091E00E946D0286E091E00E9407010895A8
|
||||
S11304B0E8ECF0E0808185FFFDCF6093CE0080E022
|
||||
S11304C0089586E08093CA00E9ECF0E080818860BA
|
||||
S11304D0808387E68093CC0008950E94610208958A
|
||||
S11304E00F931F93CF93DF938C01EB0168816623F5
|
||||
S11304F039F02196C8010E94580269916111FACF1E
|
||||
S1130500DF91CF911F910F910895EE0FFF1F05907A
|
||||
S10D0510F491E02D0994F894FFCF54
|
||||
S109051A626C610A00009E
|
||||
S11300A01D92AB30B207E1F710E0C6E7D0E004C020
|
||||
S11300B02297FE010E94F702C437D107C9F70E94B4
|
||||
S11300C009020C94FB020C940000FF920F931F93FF
|
||||
S11300D0CF93DF931F92CDB7DEB7F82E092F162FDB
|
||||
S11300E049830E94C40262E08F2D902F0E94E9028E
|
||||
S11300F0612F8F2D902F0E94E9024981642F8F2D4B
|
||||
S1130100902F0E94E9028F2D902F0F90DF91CF91B5
|
||||
S11301101F910F91FF900C94C202CF93DF93D82FBD
|
||||
S1130120C92F0E94C40260EC8D2F9C2F0E94E9020B
|
||||
S11301308FE99FE00197F1F700C000008D2F9C2FFD
|
||||
S11301400E94C2028FE39CE90197F1F700C000000E
|
||||
S113015047E06AE28D2F9C2F0E94650040E969E226
|
||||
S11301608D2F9C2F0E94650042E068E28D2F9C2F0A
|
||||
S11301700E94650043E06BE28D2F9C2F0E94650076
|
||||
S113018040E660E68D2F9C2F0E94650040E660E704
|
||||
S11301908D2F9C2F0E94650040E060E28D2F9C2FE4
|
||||
S11301A00E94650040E061E28D2F9C2F0E94650053
|
||||
S11301B040E062E28D2F9C2F0E94650040E063E2E4
|
||||
S11301C08D2F9C2F0E94650040E064E28D2F9C2FB0
|
||||
S11301D00E94650040E065E28D2F9C2F0E9465001F
|
||||
S11301E040E066E28D2F9C2F0E94650040E067E2AC
|
||||
S11301F08D2F9C2F0E94650040E06CE08D2F9C2F7A
|
||||
S1130200DF91CF910C946500FC014083518362839C
|
||||
S11302100C948D00FF920F931F93CF93DF9300D024
|
||||
S1130220CDB7DEB7F82E092F162F2A8349830E94F3
|
||||
S1130230C40265E08F2D902F0E94E902612F8F2D5B
|
||||
S1130240902F0E94E9024981642F8F2D902F0E94E4
|
||||
S1130250E9022A81622F8F2D902F0E94E9028F2DAF
|
||||
S1130260902F0F900F90DF91CF911F910F91FF90DE
|
||||
S11302700C94C2021F93CF93DF93D82FC92F0E94EF
|
||||
S1130280C40260EB8D2F9C2F0E94E9026FEF8D2F2B
|
||||
S11302909C2F0E94E902182F6FEF8D2F9C2F0E9434
|
||||
S11302A0E9028D2F9C2F0E94C202812FDF91CF91F2
|
||||
S11302B01F9108959F92AF92BF92CF92DF92EF92D7
|
||||
S11302C0FF920F931F93CF93DF931F92CDB7DEB7A7
|
||||
S11302D05C016B010E943A01982E8983898186FD15
|
||||
S11302E011C0898187FD7FC08FEF0F90DF91CF917F
|
||||
S11302F01F910F91FF90EF90DF90CF90BF90AF9040
|
||||
S11303009F900895C5010E94C40260E9C5010E943E
|
||||
S1130310E9026FEFC5010E94E902282F30E0220FA5
|
||||
S1130320331F220F331F220F331FF6013183208323
|
||||
S11303306FEFC5010E94E902482F50E0569547959A
|
||||
S1130340529542954F7045275F704527F6012081ED
|
||||
S11303503181242B352B318320836FEFC5010E941B
|
||||
S1130360E9026FEFC5010E94E9026FEFC5010E9427
|
||||
S1130370E9028F70F60183838823A1F086010C5F64
|
||||
S11303801F4F7601F5E0EF0EF11C8150E80EF11CD1
|
||||
S11303906FEFC5010E94E902F80181938F01EE1508
|
||||
S11303A0FF05B1F7C5010E94C202898183FD0EC019
|
||||
S11303B0F6011282898120E086FF0FC041E06CE2E1
|
||||
S11303C0C5010E940A01892D87708FCF81E0F60153
|
||||
S11303D08283898120E086FDF1CF42E06CE2C50191
|
||||
S11303E00E940A01F0CFC5010E94C40264E9C5015C
|
||||
S11303F00E94E9028ECF84B1806E84B9089585B1DC
|
||||
S11304008F7185B985B16295660F607E682B65B979
|
||||
S11304100895CF93DF93CDB7DEB72C970FB6F8943A
|
||||
S1130420DEBF0FBECDBF66E08AE091E00E94FF010F
|
||||
S113043060E071E089E091E00E948A0283E291E049
|
||||
S11304409A8389831B8282E08C838FEA8D838EEF6B
|
||||
S11304508E830EC061E08AE091E00E94FF012FEFDD
|
||||
S113046083ED90E3215080409040E1F700C000000C
|
||||
S113047062E08AE091E00E94FF012FEF81EE94E0B8
|
||||
S1130480215080409040E1F700C00000BE016F5F42
|
||||
S11304907F4F86E091E00E945A018F3FD9F664E0D5
|
||||
S11304A08AE091E00E94FF012FEF81EE94E0215059
|
||||
S11304B080409040E1F700C00000DACFCF93DF9393
|
||||
S11304C000D01F92CDB7DEB78AE091E00E94FB0115
|
||||
S11304D089E091E00E947E0260E0CE0101960E94D4
|
||||
S11304E0B90249815A816B8186E091E00E9404013E
|
||||
S11304F00F900F900F90DF91CF91089586E0809335
|
||||
S1130500CA00E9ECF0E080818860808387E680930C
|
||||
S1130510CC000895FB019081992351F0319680918C
|
||||
S1130520C80085FFFCCF9093CE0091919111F7CF35
|
||||
S1130530089524B1266124B9239825B1217F25B9D2
|
||||
S1130540DC011196ED91FC9112978081817F80836B
|
||||
S11305502C9A0895CF93DF93EC010E94990288812D
|
||||
S1130560811104C080E58CBD81E08DBDDF91CF9108
|
||||
S1130570089521E0FC01208325E230E032832183C9
|
||||
S11305800C94AA022C9A08952C98089598E080E07F
|
||||
S113059060FD2A9A60FF2A98299866950000000059
|
||||
S11305A00000000000000000000000000000000047
|
||||
S11305B0000000000000000000000000299A000074
|
||||
S11305C023B123FB222720F9880F822B915001F7B6
|
||||
S11305D00895FC012081211106C06EBD0DB407FEF3
|
||||
S11305E0FDCF8EB508950C94C602EE0FFF1F059043
|
||||
S10D05F0F491E02D0994F894FFCF74
|
||||
S10905FA626C610A0000BE
|
||||
S9030000FC
|
||||
|
@ -39,7 +39,8 @@ C_SRCS += \
|
||||
../Can.cpp \
|
||||
../Led.cpp \
|
||||
../Mainboard.cpp \
|
||||
../Rs232.cpp
|
||||
../Rs232.cpp \
|
||||
../Spi.cpp
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
@ -52,28 +53,32 @@ OBJS += \
|
||||
Can.o \
|
||||
Led.o \
|
||||
Mainboard.o \
|
||||
Rs232.o
|
||||
Rs232.o \
|
||||
Spi.o
|
||||
|
||||
|
||||
OBJS_AS_ARGS += \
|
||||
Can.o \
|
||||
Led.o \
|
||||
Mainboard.o \
|
||||
Rs232.o
|
||||
Rs232.o \
|
||||
Spi.o
|
||||
|
||||
|
||||
C_DEPS += \
|
||||
Can.d \
|
||||
Led.d \
|
||||
Mainboard.d \
|
||||
Rs232.d
|
||||
Rs232.d \
|
||||
Spi.d
|
||||
|
||||
|
||||
C_DEPS_AS_ARGS += \
|
||||
Can.d \
|
||||
Led.d \
|
||||
Mainboard.d \
|
||||
Rs232.d
|
||||
Rs232.d \
|
||||
Spi.d
|
||||
|
||||
|
||||
OUTPUT_FILE_PATH +=Mainboard.elf
|
||||
@ -96,10 +101,12 @@ LIB_DEP+=
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
./%.o: .././%.cpp
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR8/GNU C++ Compiler :
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32u2 -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<"
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O2 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32u2 -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
|
36
Mainboard/Mainboard/Debug/Spi.d
Normal file
36
Mainboard/Mainboard/Debug/Spi.d
Normal file
@ -0,0 +1,36 @@
|
||||
Spi.d Spi.o: .././Spi.cpp .././Spi.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h
|
||||
|
||||
.././Spi.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h:
|
@ -10,3 +10,5 @@ Mainboard.cpp
|
||||
|
||||
Rs232.cpp
|
||||
|
||||
Spi.cpp
|
||||
|
||||
|
@ -9,11 +9,12 @@
|
||||
#include "Led.h"
|
||||
#include "Rs232.h"
|
||||
#include "Can.h"
|
||||
#include "Spi.h"
|
||||
#include <util/delay.h>
|
||||
|
||||
Led l;
|
||||
Rs232 r;
|
||||
Can c;
|
||||
Can c(Spi(0));
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@ -28,21 +29,21 @@ int main(void)
|
||||
while(1)
|
||||
{
|
||||
l.color(Led::GREEN);
|
||||
_delay_ms(1000);
|
||||
_delay_ms(100);
|
||||
//r.send("Text\n");
|
||||
//_delay_ms(500);
|
||||
//c.can_send_message(&m);
|
||||
//l.color(Led::BLACK);
|
||||
//_delay_ms(100);
|
||||
//l.color(Led::GREEN);
|
||||
|
||||
//c.can_send_message(&m);
|
||||
uint8_t r = c.can_get_message(&m);
|
||||
if(r == 0xFF) {
|
||||
l.color(Led::RED);
|
||||
_delay_ms(10);
|
||||
_delay_ms(100);
|
||||
} else {
|
||||
l.color(Led::BLUE);
|
||||
_delay_ms(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -128,7 +128,7 @@
|
||||
<Value>DEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcccpp.compiler.symbols.DefSymbols>
|
||||
<avrgcccpp.compiler.optimization.level>Optimize (-O1)</avrgcccpp.compiler.optimization.level>
|
||||
<avrgcccpp.compiler.optimization.level>Optimize more (-O2)</avrgcccpp.compiler.optimization.level>
|
||||
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
|
||||
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcccpp.compiler.optimization.DebugLevel>Default (-g2)</avrgcccpp.compiler.optimization.DebugLevel>
|
||||
@ -171,6 +171,12 @@
|
||||
<Compile Include="Rs232.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Spi.cpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Spi.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
@ -25,7 +25,7 @@ void Rs232::init()
|
||||
UBRR1L = (F_CPU / (BAUD_RATE * 16L) - 1); //Teiler wird gesetzt
|
||||
}
|
||||
|
||||
void Rs232::send(char * text) {
|
||||
void Rs232::send(const char * text) {
|
||||
while (*text)
|
||||
{
|
||||
uart_putchar(*text);
|
||||
|
@ -20,7 +20,7 @@ class Rs232 {
|
||||
public:
|
||||
Rs232();
|
||||
Rs232(int) {}
|
||||
void send(char *text);
|
||||
void send(const char *text);
|
||||
};
|
||||
|
||||
|
||||
|
104
Mainboard/Mainboard/Spi.cpp
Normal file
104
Mainboard/Mainboard/Spi.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Spi.cpp
|
||||
*
|
||||
* Created: 06.11.2013 15:49:57
|
||||
* Author: netz
|
||||
*/
|
||||
|
||||
#include "Spi.h"
|
||||
|
||||
Spi::Spi(uint8_t index) : mode(1) { //, canport(&PORTB) /* : m_index (index) {} */ {
|
||||
init();
|
||||
}
|
||||
|
||||
void Spi::init() {
|
||||
init_port();
|
||||
if(mode == 0) {
|
||||
init_spi();
|
||||
}
|
||||
}
|
||||
|
||||
#define CANDDR_SPI DDRB
|
||||
#define CANPORT_SPI PORTB
|
||||
#define CANPIN_SPI PINB
|
||||
#define CANP_MISO PINB3
|
||||
#define CANP_MOSI PINB2
|
||||
#define CANP_SCK PINB1
|
||||
#define CANP_CS PINB4
|
||||
|
||||
void Spi::init_port() {
|
||||
CANDDR_SPI |= (1<<CANP_SCK) | (1<<CANP_MOSI) | (1<<CANP_CS);
|
||||
CANDDR_SPI &= ~(1<<CANP_MISO);
|
||||
CANPORT_SPI &= ~((1<<CANP_MOSI) | (1<<CANP_MISO) | (1<<CANP_SCK));
|
||||
*canport &= ~((1<<CANP_MOSI) | (1<<CANP_MISO) | (1<<CANP_SCK));
|
||||
CANPORT_SPI |= (1<<CANP_CS);
|
||||
}
|
||||
|
||||
void Spi::init_spi() {
|
||||
SPCR = (1<<SPE) | (1<<MSTR);
|
||||
SPSR = (1<<SPI2X);
|
||||
}
|
||||
|
||||
void Spi::CSOff() {
|
||||
CANPORT_SPI |= (1<<CANP_CS);
|
||||
}
|
||||
|
||||
void Spi::CSOn() {
|
||||
CANPORT_SPI &= ~(1<<CANP_CS);
|
||||
}
|
||||
|
||||
uint8_t Spi::send(uint8_t data) {
|
||||
if(mode == 0) {
|
||||
return send_hard(data);
|
||||
}
|
||||
return send_soft(data);
|
||||
}
|
||||
|
||||
uint8_t Spi::send_hard( uint8_t data ) {
|
||||
// Sendet ein Byte
|
||||
SPDR = data;
|
||||
|
||||
// Wartet bis Byte gesendet wurde
|
||||
loop_until_bit_is_set(SPSR, SPIF);
|
||||
|
||||
return SPDR;
|
||||
}
|
||||
|
||||
uint8_t Spi::send_soft(uint8_t data) {
|
||||
uint8_t werti = 0;
|
||||
|
||||
for (uint8_t i = 8; i != 0; i--) {
|
||||
CANPORT_SPI = (CANPORT_SPI & (~(1 << CANP_MOSI))) | ((data & 1) << CANP_MOSI);
|
||||
CANPORT_SPI &= ~(1<<CANP_SCK);
|
||||
data >>= 1;
|
||||
asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");
|
||||
asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");
|
||||
asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");
|
||||
asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");asm volatile ("nop");
|
||||
CANPORT_SPI |= (1<<CANP_SCK);
|
||||
asm volatile ("nop");
|
||||
werti = (werti << 1) | ((CANPIN_SPI >> CANP_MISO) & 1);
|
||||
}
|
||||
//RF_PORT &= ~(1<<CS);
|
||||
/*for (i=0; i<8; i++)
|
||||
{
|
||||
if (wert & (1<<i)) {
|
||||
|
||||
|
||||
CANPORT_SPI |= (1<<CANP_MOSI);
|
||||
}
|
||||
else {
|
||||
CANPORT_SPI &= ~(1<<CANP_MOSI);
|
||||
}
|
||||
werti<<=1;
|
||||
if (CANPIN_SPI & (1<<CANP_MISO)) {
|
||||
werti|=1;
|
||||
}
|
||||
CANPORT_SPI |= (1<<CANP_SCK);
|
||||
wert<<=1;
|
||||
_delay_us(0.3);
|
||||
CANPORT_SPI &= ~(1<<CANP_SCK);
|
||||
}*/
|
||||
//RF_PORT |= (1<<CS);
|
||||
return werti;
|
||||
}
|
35
Mainboard/Mainboard/Spi.h
Normal file
35
Mainboard/Mainboard/Spi.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Spi.h
|
||||
*
|
||||
* Created: 06.11.2013 15:41:34
|
||||
* Author: netz
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SPI_H_
|
||||
#define SPI_H_
|
||||
|
||||
#include <avr/io.h>
|
||||
|
||||
class Spi {
|
||||
public:
|
||||
Spi(uint8_t index);
|
||||
void CSOn();
|
||||
void CSOff();
|
||||
uint8_t send(uint8_t data);
|
||||
private:
|
||||
const uint8_t mode; //0 Hardware, 1 Software
|
||||
volatile uint8_t *canport;
|
||||
//static uint8_t spiport = PORTB;
|
||||
void init();
|
||||
void init_port();
|
||||
void init_spi();
|
||||
uint8_t send_soft(uint8_t data);
|
||||
uint8_t send_hard(uint8_t data);
|
||||
/*protected:
|
||||
uint8_t m_index;*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* SPI_H_ */
|
Loading…
Reference in New Issue
Block a user