0

I am building the LUFA bootloader (lufa-LUFA-210130.zip file downloaded from here). I am getting the following error when I use make all:

BootloaderPrinter.c: In function 'ParseIntelHEXByte':
BootloaderPrinter.c:301:48: error: expected expression before ')' token
    if (HEXParser.CurrAddress >= BOOT_START_ADDR)

I can't see any error in this line. I have changed these parameters in the make file:

MCU          = atmega16u2
ARCH         = AVR8
BOARD        = UNO
F_CPU        = 16000000

I want to configure my Arduino as a "generic text printer". For this purpose I think my first step should be to compile the LUFA bootloader in the printer directory of the LUFA sources.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
faiz07
  • 1
  • 3
  • This is really a programming problem more than electrical engineering, but: – Marcus Müller Mar 15 '23 at 16:44
  • `BOOT_START_ADDR` is probably a macro that is defined to be empty. A good compiler would probably tell you that – but you might be stuck with an old compiler. – Marcus Müller Mar 15 '23 at 16:45
  • These are few lines from make file. I am not understanding how to fix this issue. in these lines BOOT_START_ADDR is defined CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 ) – faiz07 Mar 16 '23 at 18:52
  • When you execute `BOOT_START_OFFSET` on your shell, do you get a numeric output? If not, you need to fix that. It seems very strange that it appears as process substitution in `$()`! – Marcus Müller Mar 16 '23 at 21:15

0 Answers0