Hallo Forenmitglieder,
Bei meinem Projekt sind die IO Adressen im .S file um 0x20 höher als im
Datasheet also meistens außer Range. Im .cpp file ist alles normal. Ich
weiß wirklicht nicht woran das liegen kann.
Kurzes Beispiel:
C_file:
1 | #include <avr/io.h>
|
2 |
|
3 | extern "C" void SPI_PUT_WORD(uint8_t pword);
|
4 |
|
5 | int main(void)
|
6 | {
|
7 | SPI_PUT_WORD(0x0000);
|
8 | while(1)
|
9 | {
|
10 | //TODO:: Please write your application code
|
11 | }
|
12 | }
|
ASM File:
1 | #include <avr/io.h>
|
2 |
|
3 | .global SPI_PUT_WORD
|
4 |
|
5 | SPI_PUT_WORD: sbi (PORTB-0x20),4 ;funktioniert
|
6 | sbi PORTB,4 ;Fehler
|
7 |
|
8 | nop
|
9 | ret
|
Könnte mir jemand bitte helfen