Всем Доброго Времени суток!!!
Пытаюсь подключить SD карту canon 32мб к ATmega16
ЦЕЛЬ: Инициализация SD, запись, чтение на МК
Решил рациональнее действовать и использовать "проверенные" источники
В коде используется библиотека
EFSLАлгоритм запуска тест-программы:
(библиотеку я скомпилировал!!!)
1. Make sure that your directory contains both the example from above called
avrtest.c and the library libefsl.a .
2. Compile the program:
• On Linux (with avr-gcc): avr-gcc -I/home/user/efsl/inc/ -I/home/user/efsl/conf
-ffreestanding -mmcu=atmega128 -Os -o avrtest.o avrtest.c -L./ -lefsl
• On Windows (with WinAVR): avr-gcc -Ic:\efsl\inc -Ic:\efsl\conf -
ffreestanding -mmcu=atmega128 -Os -o avrtest.o avrtest.c -L.\ -lefsl
3. Generate a hexfile (avr-objcopy -j .text -j .data -O ihex avrtest.o avrtest.hex)(Проблема всплыла здесь...не могу понять что делать с подчёркнутой директивой)
Далее всё просто и понятно!
4. Connect an SD-card to your Atmega128 with a file called orig.txt on it.
5. Flash the hex file into your μC.
• On Linux: avrdude -P /dev/ttyUSB0 -c stk500 -p m128 -Uflash:w:avrtest.hex
• On Windows: use Atmel AVR-Studio
6. Reset your μC and wait some time (depending on how big the file orig.txt
is).
7. Disconnect the SD-card, so you can put it in your card reader and find
out if the file orig.txt is copied to copy.txt .
Помогите разобраться с созданием (hex) по этой директиве (выше)...
Если эта тест-программа заработает, то дальше точно сам разберусь!!!!
С Уважением