IRMP auf STM32 - ein USB IR Empfänger/Sender/Einschalter mit Wakeup-Timer
-
-
Die letzten kleinen Probleme sind behoben.
Der produktive Einsatz kann beginnen -
Ich bin jetzt zwar nicht unbedingt Elektronik-Laie und habe schonmal mit Teensy gearbeitet und Attiny-Chips selber programmiert.
Dennoch vermisse ich noch irgendwo eine kleine Anleitung der Form "Kauf bei ebay $ARTIKEL, schließe den TSOP an $PINS1 an, Taster kommt an $PINS2, Powerbutton-Ausgang ist an $PINS3 und programmiere Software mit $PROGRAMM in die Platine"
-
Feedback Teil 1 von mir:
Unter Ubuntu wird die Toolchain wie folgt installiert:
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabiDann ein make im Verzeichniss:
Build vom 103er läuft durch:
Zitateasyvdr@martin-VirtualBox:/usr/local/src/git/IRMP_STM32-Kopie/F103C8$ make
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o main.o main.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o cmsis_boot/system_stm32f10x.o cmsis_boot/system_stm32f10x.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irmp.o irmp/irmp.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irmpmain.o irmp/irmpmain.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irsnd.o irmp/irsnd.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irsndmain.o irmp/irsndmain.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/usb_hid.o usb_hid/usb_hid.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o cmsis_boot/startup/startup_stm32f10x_md.o cmsis_boot/startup/startup_stm32f10x_md.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/eeprom.o stm_lib/src/eeprom.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/misc.o stm_lib/src/misc.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_exti.o stm_lib/src/stm32f10x_exti.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_flash.o stm_lib/src/stm32f10x_flash.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_gpio.o stm_lib/src/stm32f10x_gpio.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_pwr.o stm_lib/src/stm32f10x_pwr.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_rcc.o stm_lib/src/stm32f10x_rcc.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_tim.o stm_lib/src/stm32f10x_tim.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_usart.o stm_lib/src/stm32f10x_usart.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/hw_config.o usb_hid/src/hw_config.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/stm32_it.o usb_hid/src/stm32_it.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_core.o usb_hid/src/usb_core.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_desc.o usb_hid/src/usb_desc.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_endp.o usb_hid/src/usb_endp.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_init.o usb_hid/src/usb_init.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_int.o usb_hid/src/usb_int.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_istr.o usb_hid/src/usb_istr.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_mem.o usb_hid/src/usb_mem.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_prop.o usb_hid/src/usb_prop.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_pwr.o usb_hid/src/usb_pwr.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_regs.o usb_hid/src/usb_regs.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_sil.o usb_hid/src/usb_sil.c
arm-none-eabi-gcc -nostartfiles -Wl,-Map=IR.map,--gc-sections,--entry=main,-Tarm-gcc-link.ld -mcpu=cortex-m3 -mthumb -g -Os -flto main.o cmsis_boot/system_stm32f10x.o irmp/irmp.o irmp/irmpmain.o irmp/irsnd.o irmp/irsndmain.o usb_hid/usb_hid.o cmsis_boot/startup/startup_stm32f10x_md.o stm_lib/src/eeprom.o stm_lib/src/misc.o stm_lib/src/stm32f10x_exti.o stm_lib/src/stm32f10x_flash.o stm_lib/src/stm32f10x_gpio.o stm_lib/src/stm32f10x_pwr.o stm_lib/src/stm32f10x_rcc.o stm_lib/src/stm32f10x_tim.o stm_lib/src/stm32f10x_usart.o usb_hid/src/hw_config.o usb_hid/src/stm32_it.o usb_hid/src/usb_core.o usb_hid/src/usb_desc.o usb_hid/src/usb_endp.o usb_hid/src/usb_init.o usb_hid/src/usb_int.o usb_hid/src/usb_istr.o usb_hid/src/usb_mem.o usb_hid/src/usb_prop.o usb_hid/src/usb_pwr.o usb_hid/src/usb_regs.o usb_hid/src/usb_sil.o -o IR.elf
arm-none-eabi-objcopy -O binary IR.elf IR.bin
easyvdr@martin-VirtualBox:/usr/local/src/git/IRMP_STM32-Kopie/F103C8$Der 105er (interessiert mich derzeit eher weniger) läuft nicht durch:
Zitatr@martin-VirtualBox:/usr/local/src/git/IRMP_STM32-Kopie/F105RC$ make
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o main.o main.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o cmsis_boot/system_stm32f10x.o cmsis_boot/system_stm32f10x.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irmp.o irmp/irmp.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irmpmain.o irmp/irmpmain.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irsnd.o irmp/irsnd.c
irmp/irsnd.c: In function 'irsnd_send_data':
irmp/irsnd.c:761:21: warning: unused variable 'command' [-Wunused-variable]
uint16_t command;
^
irmp/irsnd.c:760:21: warning: unused variable 'address' [-Wunused-variable]
uint16_t address;
^
irmp/irsnd.c: In function 'irsnd_ISR':
irmp/irsnd.c:1278:33: warning: variable 'n_auto_repetitions' set but not used [-Wunused-but-set-variable]
static uint8_t n_auto_repetitions = 0; // number of auto_repetitions
^
irmp/irsnd.c:1274:33: warning: variable 'has_stop_bit' set but not used [-Wunused-but-set-variable]
static uint8_t has_stop_bit = 0;
^
irmp/irsnd.c:1273:33: warning: unused variable 'pause_0_len' [-Wunused-variable]
static uint8_t pause_0_len = 0;
^
irmp/irsnd.c:1272:33: warning: unused variable 'pulse_0_len' [-Wunused-variable]
static uint8_t pulse_0_len = 0;
^
irmp/irsnd.c:1271:33: warning: unused variable 'pause_1_len' [-Wunused-variable]
static uint8_t pause_1_len = 0;
^
irmp/irsnd.c:1270:33: warning: unused variable 'pulse_1_len' [-Wunused-variable]
static uint8_t pulse_1_len = 0;
^
irmp/irsnd.c:1269:33: warning: variable 'startbit_pause_len' set but not used [-Wunused-but-set-variable]
static IRSND_PAUSE_LEN startbit_pause_len = 0;
^
irmp/irsnd.c:1268:33: warning: variable 'startbit_pulse_len' set but not used [-Wunused-but-set-variable]
static uint8_t startbit_pulse_len = 0;
^
irmp/irsnd.c: At top level:
irmp/irsnd.c:720:1: warning: 'bitsrevervse' defined but not used [-Wunused-function]
bitsrevervse (uint16_t x, uint8_t len)
^
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o irmp/irsndmain.o irmp/irsndmain.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/usb_hid.o usb_hid/usb_hid.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o cmsis_boot/startup/startup_stm32f10x_cl.o cmsis_boot/startup/startup_stm32f10x_cl.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/eeprom.o stm_lib/src/eeprom.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/misc.o stm_lib/src/misc.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_flash.o stm_lib/src/stm32f10x_flash.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_gpio.o stm_lib/src/stm32f10x_gpio.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_rcc.o stm_lib/src/stm32f10x_rcc.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_tim.o stm_lib/src/stm32f10x_tim.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o stm_lib/src/stm32f10x_usart.o stm_lib/src/stm32f10x_usart.c
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o usb_hid/src/usb_bsp.o usb_hid/src/usb_bsp.c
usb_hid/src/usb_bsp.c: In function 'USB_OTG_BSP_Init':
usb_hid/src/usb_bsp.c:109:3: warning: implicit declaration of function 'RCC_OTGFSCLKConfig' [-Wimplicit-function-declaration]
RCC_OTGFSCLKConfig(RCC_OTGFSCLKSource_PLLVCO_Div3);
^
usb_hid/src/usb_bsp.c:109:22: error: 'RCC_OTGFSCLKSource_PLLVCO_Div3' undeclared (first use in this function)
RCC_OTGFSCLKConfig(RCC_OTGFSCLKSource_PLLVCO_Div3);
^
usb_hid/src/usb_bsp.c:109:22: note: each undeclared identifier is reported only once for each function it appears in
usb_hid/src/usb_bsp.c:110:25: error: 'RCC_AHBPeriph_OTG_FS' undeclared (first use in this function)
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_OTG_FS, ENABLE) ;
^
usb_hid/src/usb_bsp.c: In function 'USB_OTG_BSP_EnableInterrupt':
usb_hid/src/usb_bsp.c:311:40: error: 'OTG_FS_IRQn' undeclared (first use in this function)
NVIC_InitStructure.NVIC_IRQChannel = OTG_FS_IRQn;
^
make: *** [usb_hid/src/usb_bsp.o] Fehler 1easyvdr@martin-VirtualBox:/usr/local/src/git/IRMP_STM32-Kopie/F105RC$
Die Binaries sind sicherlich unterschiedlich je nachdem ob man CoCox nutzt oder eine bestimmte GCC-ARRm Version unter Linux...
Ob das Auswirkungen haben könnte weiss ich nicht. Aber trotzdem die Frage an "jrie": Kannst Du ins Github auch gleich die Binaries legen ? -
jrie Kannst du mir bitte eine Hardware, die du für brauchbar hältst, empfehlen? Ich hätte gerne so eine kleine Platine und wenn möglich würde ich gerne direkt über USB programmieren.
An einer (ggf. bebilderten) Anleitung würde ich mich dann mal versuchen. Ich habe zwar schon einen IR-Empfänger, aber die Idee, dass hier eine Open-Source-Lösung geschaffen wird, reizt mich.
-
Ich bin zwar nicht JRIE, aber wenn Du dieses Teil kaufst... :
(Gerne auch bei ebay, nur finde ich das spontan nicht)
http://www.aliexpress.com/stor…er/524881_1446941850.html
...dann kannst Du wenn gewünscht mal diese Platine draufstecken (falls die auch spontan funktionieren nach der Lieferung):
[Blockierte Grafik: https://raw.githubusercontent.com/ranseyer/STM32-IRMP-Hardware/master/1_Small_ST-Link/STl-Link-V10-final-top.jpg]
https://github.com/ranseyer/ST…ee/master/1_Small_ST-Link
(Viele Bauteile sind optional)Die Platine sollte auch auf den roten ST-Link in diesem Thread passen (2,54mm Abstand zwischen den Pin-Reihen). Aber beim roten müssen ggf. noch Widerstände entfernt werden.
Somit würde ich eher den blauen von LC-Tech verwenden. (Und von LC-Tech hab ich im anderen Projekt schon massenweise die AVR Programmer verbaut: USB-Einschalter und IR-Receiver Projekt)Platinen habe ich reichlich bestellt. Falls diese funktionieren gebe ich auch welche ab. (mit und ohne Bestückung)
-
Irgendwas haut mit der Toolchain unter Linux noch nicht hin. Zunächst mal bekomm ich teilweise beim Flashen:
$ make flash
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o main.o main.c
[...]
arm-none-eabi-gcc -Wall -ffunction-sections -fno-builtin -mcpu=cortex-m3 -mthumb -g -Os -flto -Icmsis -Icmsis_boot -Istm_lib/inc -Iusb_hid -Iusb_hid/inc -Iirmp -DSTM32F103C8 -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -c -o cmsis_boot/startup/startup_stm32f10x_md.o cmsis_boot/startup/startup_stm32f10x_md.carm-none-eabi-gcc -nostartfiles -Wl,-Map=IR.map,--gc-sections,--entry=main,-Tarm-gcc-link.ld -mcpu=cortex-m3 -mthumb -g -Os -flto main.o usb_hid/usb_hid.o cmsis_boot/system_stm32f10x.o irmp/irsnd.o irmp/irmp.o irmp/irsndmain.o irmp/irmpmain.o usb_hid/src/usb_desc.o usb_hid/src/usb_endp.o usb_hid/src/usb_mem.o usb_hid/src/usb_init.o usb_hid/src/usb_prop.o usb_hid/src/hw_config.o usb_hid/src/stm32_it.o usb_hid/src/usb_sil.o usb_hid/src/usb_regs.o usb_hid/src/usb_core.o usb_hid/src/usb_int.o usb_hid/src/usb_istr.o usb_hid/src/usb_pwr.o stm_lib/src/stm32f10x_pwr.o stm_lib/src/stm32f10x_rcc.o stm_lib/src/stm32f10x_flash.o stm_lib/src/stm32f10x_usart.o stm_lib/src/misc.o stm_lib/src/stm32f10x_tim.o stm_lib/src/stm32f10x_gpio.o stm_lib/src/eeprom.o stm_lib/src/stm32f10x_exti.o cmsis_boot/startup/startup_stm32f10x_md.o -o IR.elf
arm-none-eabi-objcopy -O binary IR.elf IR.bin
stm32flash -v -w IR.bin /dev/ttyUSB0
stm32flash 0.4http://stm32flash.googlecode.com/
Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0410 (Medium-density)
- RAM : 20KiB (512b reserved by bootloader)
- Flash : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x08004100 (99.58%) Error: WRITE address and length must be 4 byte aligned
Failed to write memory at address 0x08004100Makefile:26: die Regel für Ziel „flash“ scheiterte
make: *** [flash] Fehler 1
Also funktioniert das Linkerskript noch nicht ganz wie es sollte, was ja u.a. für das Alignment zuständig ist. Desweiteren/Dementsprechend funktioniert das von mir erstellte Binary einfach nicht. Ich bekomme immer Fehlermeldungen beim Anstecken:Code
Alles anzeigenkernel: usb 6-1: new full-speed USB device number 15 using uhci_hcd kernel: usb 6-1: device not accepting address 15, error -71 kernel: usb 6-1: new full-speed USB device number 16 using uhci_hcd kernel: usb 6-1: device not accepting address 16, error -71 kernel: usb 6-1: new full-speed USB device number 17 using uhci_hcd kernel: usb 6-1: device descriptor read/64, error -71 kernel: usb 6-1: device descriptor read/64, error -71 kernel: usb 6-1: new full-speed USB device number 18 using uhci_hcd kernel: usb 6-1: device descriptor read/64, error -71 kernel: usb 6-1: device descriptor read/64, error -71 kernel: usb usb6-port1: unable to enumerate USB device
Mit den Binaries von jrie, die vermutlich unter Windows mit coocox gebaut wurden, gibt es keine Fehlermeldungen beim Anstecken. Gibt es hier einen Linker-Skript Spezialisten?
BTW: Ich beziehe mich hier auf STM32F103. -
M-Reimer :
Hast du das
https://github.com/j1rie/IRMP_…master/IRMP_auf_STM32.pdf
und das
https://www.mikrocontroller.ne…schalter_mit_Wakeup-Timer
schon angeschaut?
Das noch detaillierter auszuarbeiten, braucht noch etwas mehr Zeit.
Ich baue gerne alles, was noch fehlt, ins mikrocontroller.net Wiki ein.
Da dort, soweit ich weiß, jeder Schreibrechte hat, kannst du das aber auch.Der Rote ist von hier:
http://www.ebay.de/itm/370887065223
Der ist noch etwas kleiner, aber eventuell müssen ein paar Widerstände entfernt werden.
Der Blaue steht in Post #18. Da Martin die Platine dafür macht, empfehle ich den.
Der ist von mir zufriedenstellend getestet worden.
Der Haken am Blauen ist, dass das Firmware Update erfordert, hinten auf dem Board eine Stelle auf Masse zu ziehen (siehe Bild im Forum), und zwar im richtigen Moment (Post #46). Nicht beim ersten Mal, aber jedes weiter Mal.
Für die Platine ist das aber einfacher. -
Beim Linker Script kann ich gerade nicht helfen, da das Netzteil von meinem Linux PC abgeraucht ist.
Allerdings habe ich mit olebowle's Makefile aus Post #49 erfolgreich auf openSuse gebaut, und das Binary lief auch richtig. -
Die Binaries sind im github.
-
Ganz direkt über USB programmieren geht nur mit dem F105 u.ä.
Bei dem F103 hat man die Wahl zwischen USB2seriell und USB-ST-Link.
Das einfachste ist, gleich zwei Blaue zu kaufen. Dann wird der eine mit dem anderen programmiert.Man könnte auch einen entsprechenden Bootloader flashen, dann kann man ab dem zweiten Mal über USB flashen.
Mit zwei Blauen ist es aber so sehr praktisch, dass ich das von meiner Todo Liste genommen habe. -
-
Ich habe
https://launchpad.net/gcc-arm-…q3-20140805-linux.tar.bz2
genommen. -
Cool, das war es tatsächlich.
Mit gcc-arm-none-eabi-bin aus dem AUR kommt jetzt zumindest erstmal keine Fehlermeldung beim Anstecken mehr. -
Wenn man zwei Blaue nimmt, muss man bei einem zwei Pins ein löten oder zwei Kabel anlöten.
Wenn man das nicht will, ist es besser einen Roten und einen Blauen zu nehmen.
Das Beste wäre es zwei Blaue zu nehmen und bei beiden je zwei zusätzliche Pins ein zu löten. Damit spart man sich den Aufwand beim erneuten Flashen. Wobei dann wieder die Platine nicht passt.
Die "optimale" Lösung gibt es also nicht, sondern es hängt von den jeweiligen Präferenzen ab.Ich glaube eine genaue Bauanleitung ist eine gute Idee.
Wenn ich meinen zweiten Blauen habe, und dazu komme, kümmere ich mich mal darum.Wahrscheinlich hat aber jeder andere Vorlieben, und die zu Jedem passende Anleitung wird es nicht werden.
-
Da ich bei Aliexpress nichts bestellen kann würde es wohl die rote Platine werden. Was sind da genau für Umbauten nötig? Kann ich auch zwei rote Platinen verbinden um die eine mit der anderen zu programmieren? Was hat es mit dem Reset auf sich, von dem du geschrieben hast? Hast du mal die Platinen verglichen? Kann man die rote eventuell so umrüsten, dass sie auch ohne "Reset" geflasht werden kann?
-
Da ich bei Aliexpress nichts bestellen kann würde es wohl die rote Platine werden. Was sind da genau für Umbauten nötig?
Das muss ich erst noch heraus bekommen
Kann ich auch zwei rote Platinen verbinden um die eine mit der anderen zu programmieren?
Ja. Zwei von den 4 kleinen "Löchern" müssen verbunden werden (Post #18 ).
Was hat es mit dem Reset auf sich, von dem du geschrieben hast? Hast du mal die Platinen verglichen? Kann man die rote eventuell so umrüsten, dass sie auch ohne "Reset" geflasht werden kann?
Der Reset ist zum Flashen nötig. Eine genauere Beschreibung als in Post #46 wird es dann (hoffentlich) in der Bauanleitung geben. Ohne Reset geht es leider nicht, da die Programmiereingänge für andere Funktionen umkonfiguriert werden. Sobald man einmal eine entsprechende Firmware geflasht hat, scheint das nötig zu sein. Beim Roten war es aber auch ohne das nötig, ich weiß noch nicht wieso. Das Zeitfenster ist relativ kurz, und meistens brauche ich mehrere Versuche, bis es endlich klappt. Mehrmals musste ich sogar unterschiedliche Software benutzen. Ich habe es noch nicht systematisch untersucht. Deswegen schrieb ich, dass es etwas "stressig" ist.
Aber Martin war das lieber, als die Platine komplizierter zu machen. Wenn man die Platine nicht benutzt, würde ich davon abraten, es sei denn, man schlägt sich gerne mit Kniffligem herum.
Zwei Blaue oder ein Roter und ein Blauer ohne Platine wäre einfacher.
Mit den Entwickler-Boards hat man diese Probleme nicht, aber die sind halt deutlich größer.Sobald ich den zweiten Blauen habe, und ich den Roten nicht mehr zum Programmieren brauche, kann ich ihn "opfern", d.h. so modifizieren wie nötig. Wenn ich dann mehr weiß, gibt es die Infos hier.
Du stellst gute Fragen Das bringt mich dazu, es genauer darzustellen
-
-
Zur Zeit ist mein github leer. Der Code wird komplett überarbeitet. Sobald dies abgeschlossen ist, kommt er wieder in github.
-
Eigentlich ist gerade das einer der Vorteile, dass man Entwicklungsschritte nachvollziehen kann. Ein Repository in seiner Lebenszeit zu löschen macht nur äußerst selten Sinn...
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!