avr-objcopy: 'aes.elf': No such file ...

Go To Last Post
68 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If can someone can help Please, i'm not good in programing

 

from This atmega168 Makefile:

 

###############################################################################
# Makefile for the project aes
###############################################################################

## General Flags
PROJECT = aes
MCU = atmega168
TARGET = aes.elf
CC = avr-gcc

CPP = avr-g++

## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL          -DF_CPU=8000000UL -Os -fsigned-char
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += $(CFLAGS)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2

## Linker flags
LDFLAGS = $(COMMON)
# atmega168v, 2kb bootloader = 0x3800 (16384 - 2048 = 14336 (0x3800) )
# atmega328p, 2kb bootloader = 0x7800 (32768 - 2048 = 30720 (0x7800) )
# atmega328p, 4kb bootloader = 0x7000 (32768 - 4096 = 28672 (0x7000) )
LDFLAGS += -nostartfiles  -Wl,--section-start=.text=0x3800 -Wl,-Map=aes.map
# ... and change the value in bootldr.h file (MEM_SIZE = 14336 ) !!!

# also, ensure that you program the bootloader with the correct fuses!

## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature

HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings

## Objects that must be built in order to link
OBJECTS = aes.o bootldr.o usart.o sys_startup.o aesflash.o crc.o loader.o

## Objects explicitly added by the user
LINKONLYOBJECTS =

## Build
all: $(TARGET) aes.hex aes.eep aes.lss size

## Compile
aes.o: ../aes.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

bootldr.o: ../bootldr.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

usart.o: ../usart.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

sys_startup.o: ../sys_startup.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

aesflash.o: ../aesflash.S
    $(CC) $(INCLUDES) $(ASMFLAGS) -c  $<

crc.o: ../crc.S
    $(CC) $(INCLUDES) $(ASMFLAGS) -c  $<

loader.o: ../loader.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

##Link
$(TARGET): $(OBJECTS)
     $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)

%.hex: $(TARGET)
    avr-objcopy -O ihex $(HEX_FLASH_FLAGS)  $< $@

%.eep: $(TARGET)
    -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0

%.lss: $(TARGET)
    avr-objdump -h -S $< > $@

size: ${TARGET}
    @echo
    @avr-size -C --mcu=${MCU} ${TARGET}

## Clean target
.PHONY: clean
clean:
    -rm -rf $(OBJECTS) aes.elf dep/* aes.hex aes.eep aes.lss aes.map

## Other dependencies
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)

 

=======================================================================================

I get this error in avr studio 4.19, if i try to import/use in newer atmel studio i get more errors,  Please if you can edit and post what i must paste will be so much helpful, thank you very much!!!

=======================================================================================

 

Build started 9.1.2020 at 20:01:53
mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT aes.o -MF dep/aes.o.d  -c  ../a
es.c

/usr/bin/sh: -Wall: command not found
make: [aes.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT bootldr.o -MF dep/bootldr.o.d  
-c  ../bootldr.c

/usr/bin/sh: -Wall: command not found
make: [bootldr.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT usart.o -MF dep/usart.o.d  -c  
../usart.c

/usr/bin/sh: -Wall: command not found
make: [usart.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT sys_startup.o -MF dep/sys_start
up.o.d  -c  ../sys_startup.c

/usr/bin/sh: -Wall: command not found
make: [sys_startup.o] Error 127 (ignored)
mmcu=atmega168 -mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT aesflash.o -MF
dep/aesflash.o.d  -x assembler-with-cpp -Wa,-gdwarf2 -c  ../aesflash.S

/usr/bin/sh: -mmcu=atmega168: command not found
make: [aesflash.o] Error 127 (ignored)
mmcu=atmega168 -mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT crc.o -MF dep/c
rc.o.d  -x assembler-with-cpp -Wa,-gdwarf2 -c  ../crc.S

/usr/bin/sh: -mmcu=atmega168: command not found
make: [crc.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL            -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT loader.o -MF dep/loader.o.d  -c
  ../loader.c

/usr/bin/sh: -Wall: command not found
make: [loader.o] Error 127 (ignored)
mmcu=atmega168 -nostartfiles  -Wl,--section-start=.text=0x3800 -Wl,-Map=aes.map aes.o bootldr.o usart.o sys_startup.o aesflash.o crc.o loader.o     -o aes.elf
/usr/bin/sh: -nostartfiles: command not found
make: [aes.elf] Error 127 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  aes.elf aes.hex
avr-objcopy: 'aes.elf': No such file
make: *** [aes.hex] Error 1
Build failed with 1 errors and 0 warnings...

 

 

Last Edited: Fri. Jan 17, 2020 - 07:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With error messages, it's always the first one that you need to pay attention to before others.

 

The "  'aes.elf': No such file " is the final message - and will be a direct result of all the preceding errors!

 

For every single compilation, you are getting:

/usr/bin/sh: -Wall: command not found
make: [aes.o] Error 127 (ignored)

Your makefile seems to be misinterpreting the -Wall option as a command?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

have a look at

 

http://hackaday.com/2016/03/15/embed-with-elliot-microcontroller-makefiles

 

and this (from one of my projects)

 

https://github.com/epccs/RPUno/blob/master/BlinkLED/Makefile

 

and all the details

 

https://www.gnu.org/software/make/manual/make.html

 

There are implicit rules which automatically turn blink.c into blink.o

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the reply,are some erors inside, but i don't know programming and for me are like Chinse, :(

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i need to do some changes on the atmega168/328 on the input and output pinout,and are 2 led on the design and i want to remove one, and the error from the script.If someone can help me, he can Pm me and we can talks aout how much it cost, to, i don't need free :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You didn't say which version of avr-gcc it is you are trying to use. I suspect it is "WinAVR" and because you are using Studio 4.19 and not 4.18 I further suspect you are suffering from this:

 

https://www.avrfreaks.net/forum/...

 

IOW you have to MANUALLY tell Studio where to find avr-gcc (from WinAVR) - it no longer finds it automatically via the registry (but it will find "Atmel toolchain" builds of avr-gcc)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chriszux wrote:
we can talks aout how much it cost, to, i don't need free :( 

So this is actually looking for someone to do the work for you?

 

Perhaps should be moved to the Marketplace, then ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

BTW I can't help thinking that AS7 is maybe a better option in 2020 than 10 year old AS4 + WinAVR ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All. What i want to do is use the .hex file and to make a .hex file including the AES Botloader, and to flush all in one go, i generated a hex file 38KB size, but i don't know how to add the bot loader on it (AES, AVR231: AES Bootloader,) and also what is very important, is to set the fuses so the botloader is locked after the IC is programmed,what are the fuses for reading the atmega168 full IC ?i generated file in this case is the 38KB file, but that is not including the the Botloader is a small eeprom file what it need to be programmed first and after the flush file then to read all to get a production file ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So you're going to have to:

 

  • Either learn to program & use all the nesessary tools,
     
  • Or hire someone to do this for you.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have a makefile atmega168 ant that is giving the error when i try to create the file including AES Botloader.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chriszux wrote:
i generated a hex file 38KB size, but i don't know how to add the bot loader on it
Well ultimately when you have created both a .hex file for the application and a .hex file for the bootloader you can just paste them together in a text editor then look for the 

:00000001FF

line in the middle (not the one at the end) that marks where one lot of HEX ends and the next starts and remove that one line. Alternatively use srec_cat to join the two .hex files (it'll effectively do the same thing).

 

BTW can we assume that the AES bootloader you are trying to build is the one from the Atmel application note? If so I would be surprised if the solution file could not be loaded into AS7 to build it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes what i have i have a premade .hex file but IC Won't Work Or Run With that,i think is becouse it don't have the botloader, the software was writen by someone else and inside the folder is a file .prj when i double click that and it open Code Vision AVR and i create with that the default file, but i need to add to it the AES bootloader, and there i get the error :( now the error change as i went down for the atmel 4.18

 

Build started 10.1.2020 at 11:42:18
avr-gcc  -mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL                      -DF_CPU=8000000UL -Os -fsigned-char -MD -MP -MT aes.o -MF dep/aes.o.d  -c  ../aes.c
avr-gcc  -mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL                      -DF_CPU=8000000UL -Os -fsigned-char -MD -MP -MT bootldr.o -MF dep/bootldr.o.d  -c  ../bootldr.c
../bootldr.c:24:31: error: ../../(here is looking for the folderi don't know where to put that folder)/global.h: No such file or directory
../bootldr.c: In function 'main':
../bootldr.c:59: error: 'PORTC_VALUE' undeclared (first use in this function)
../bootldr.c:59: error: (Each undeclared identifier is reported only once
../bootldr.c:59: error: for each function it appears in.)
../bootldr.c:67: error: 'BOOTLOADER_FLAG_ADDR' undeclared (first use in this function)
../bootldr.c:67: error: 'BOOTLOADER_FLAG_ENABLE' undeclared (first use in this function)
make: *** [bootldr.o] Error 1
Build failed with 6 errors and 0 warnings...

 

============================

i also installed winavr

============================

 

i tried to point to the makefile  or to makefile168 , are inside the botloader project already made, i'm sorry for my bad way of explaining :(

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

oh i look at Message:

 

Loaded plugin STK500
Loaded plugin AVR GCC
Loaded partfile: C:\Program Files (x86)\Atmel\AVR Tools\PartDescriptionFiles\ATmega168

 

i try to add there the files needed, to see what is happening

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

no, are some .xml files in there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well ultimately when you have created both a .hex file for the application and a .hex file for the bootloader you can just paste them together in a text editor then look for the

 

i'm unable to generate the second file :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll ask again. Is it this you are talking about..

 

https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en591242

 

EDIT: OK after a bit of googling it seems what you are trying to use is something called "AVRUB" which is here:

 

https://sourceforge.net/projects/avrub/

 

It sure would have helped if you said that in the first place!

 

The readme in the latter talks about running some kind of configuration program and it then generating an bootcfg.h file - I imagine it will be defining the symbols your build is complaining about not having.

 

EDIT2: OK, while avrub does indeed have a bootldr.c file I cannot find things like PORTC_VALUE or  BOOTLOADER_FLAG_ADDR  mentioned anywhere in the files I downloaded. So is it "avrub" and if it is, is this some old version you have?

Last Edited: Fri. Jan 10, 2020 - 12:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes is this one

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


But like I say the latest version that I downloaded does not contain any of the symbolic names that were reported as errors in your post:

chriszux wrote:
../bootldr.c:59: error: 'PORTC_VALUE' undeclared (first use in this function)

../bootldr.c:59: error: (Each undeclared identifier is reported only once

../bootldr.c:59: error: for each function it appears in.)

../bootldr.c:67: error: 'BOOTLOADER_FLAG_ADDR' undeclared (first use in this function)

../bootldr.c:67: error: 'BOOTLOADER_FLAG_ENABLE' undeclared (first use in this function)

make: *** [bootldr.o] Error 1

Build failed with 6 errors and 0 warnings...
So it seems that you have a different (presumbably older?) version than the latest one listed on SourceForge or you have changed the code in some way since it was downloaded?

 

If I simply take the "5.2" files from the site and load the BootLdr.atsln file into AS7 and build I get:

 

 

As you can see that has built without error and reports "Build Succeeded".

 

So if I was you I'd throw away your old versio, throw away your old Studio, throw away your old avr-gcc (WinAVR) and just download the latest code from Sourceforge and AS7 from Microchip and have an easy life.

Last Edited: Fri. Jan 10, 2020 - 12:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

###############################################################################
# Makefile for the project aes
###############################################################################

## General Flags
PROJECT = aes
MCU = atmega168
TARGET = aes.elf
CC = avr-gcc

CPP = avr-g++

## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions -DBAUD=250000UL -DF_CPU=8000000UL -Os -fsigned-char
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += $(CFLAGS)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2

## Linker flags
LDFLAGS = $(COMMON)
# atmega168v, 2kb bootloader = 0x3800 (16384 - 2048 = 14336 (0x3800) )
# atmega328p, 2kb bootloader = 0x7800 (32768 - 2048 = 30720 (0x7800) )
# atmega328p, 4kb bootloader = 0x7000 (32768 - 4096 = 28672 (0x7000) )
# you have to change the value in config file (MEM_SIZE = ...... )
# also, ensure that you program the bootloader with the correct fuses!
LDFLAGS += -nostartfiles  -Wl,--section-start=.text=0x00 -Wl,-Map=aes.map

## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature

HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings

## Objects that must be built in order to link
OBJECTS = aes.o bootldr.o usart.o sys_startup.o aesflash.o crc.o loader.o

## Objects explicitly added by the user
LINKONLYOBJECTS =

## Build
all: $(TARGET) aes.hex aes.eep aes.lss size

## Compile
aes.o: ../aes.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

bootldr.o: ../bootldr.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

usart.o: ../usart.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

sys_startup.o: ../sys_startup.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

aesflash.o: ../aesflash.S
    $(CC) $(INCLUDES) $(ASMFLAGS) -c  $<

crc.o: ../crc.S
    $(CC) $(INCLUDES) $(ASMFLAGS) -c  $<

loader.o: ../loader.c
    $(CC) $(INCLUDES) $(CFLAGS) -c  $<

##Link
$(TARGET): $(OBJECTS)
     $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)

%.hex: $(TARGET)
    avr-objcopy -O ihex $(HEX_FLASH_FLAGS)  $< $@

%.eep: $(TARGET)
    -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0

%.lss: $(TARGET)
    avr-objdump -h -S $< > $@

size: ${TARGET}
    @echo
    @avr-size -C --mcu=${MCU} ${TARGET}

## Clean target
.PHONY: clean
clean:
    -rm -rf $(OBJECTS) aes.elf dep/* aes.hex aes.eep aes.lss aes.map

## Other dependencies
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)

 

========================================================

now i get diferent error, i want to ask something, i must put the .hex file inside the mega168 folder where it make the AES botloader file with the keys or it just generate a small .hex .eep file and i add it as you describe above to the initial running hex file (the 32KB file in this case)

========================================================

error:

 

Build started 10.1.2020 at 12:37:17
make: option requires an argument -- f
Usage: make [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help                  Print this message and exit.
  -i, --ignore-errors         Ignore errors from commands.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.
  -k, --keep-going            Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below N.
  -L, --check-symlink-times   Use the latest mtime between symlinks and target.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any commands; just print them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake it.
  -p, --print-data-base       Print make's internal database.
  -q, --question              Run no commands; exit status says if up to date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  -s, --silent, --quiet       Don't echo commands.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.

This program built for i386-pc-mingw32
Report bugs to <bug-make@gnu.org>
Build failed with 1 errors and 0 warnings...

 

Thank you.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lol was my mistake i selected use external makefile and was empty in there

again same eror :

 

Build started 10.1.2020 at 12:44:40
avr-gcc  -mmcu=atmega328p -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL          -DF_CPU=8000000UL -Os -fsigned-char -MD -MP -MT aes.o -MF dep/aes.o.d -c  ../aes.c
avr-gcc  -mmcu=atmega328p -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL          -DF_CPU=8000000UL -Os -fsigned-char -MD -MP -MT bootldr.o -MF dep/bootldr.o.d -c  ../bootldr.c
../bootldr.c:24:31: error: ../../folder is looking for/global.h: No such file or directory
../bootldr.c: In function 'main':
../bootldr.c:59: error: 'PORTC_VALUE' undeclared (first use in this function)
../bootldr.c:59: error: (Each undeclared identifier is reported only once
../bootldr.c:59: error: for each function it appears in.)
../bootldr.c:67: error: 'BOOTLOADER_FLAG_ADDR' undeclared (first use in this function)
../bootldr.c:67: error: 'BOOTLOADER_FLAG_ENABLE' undeclared (first use in this function)
make: *** [bootldr.o] Error 1
Build failed with 6 errors and 0 warnings...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


PS I see your build reported:

../bootldr.c:67: error: 'BOOTLOADER_FLAG_ADDR' undeclared (first use in this function)

Can't help noticing that this latest, working build has:

 

 

It seems very likely these are one and the same thing, just with a new name (and it's already defined as E2END - so uses last byte in the EEPROM).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
So if I was you I'd throw away your old versio, throw away your old Studio, throw away your old avr-gcc (WinAVR) and just download the latest code from Sourceforge and AS7 from Microchip and have an easy life.
I really, really suggest that!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i just see your help i must update, if i generate the keys and make the 2 key files and send you the 2 keys files and the .hex 38kb file can you make the file for me please ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nope, I'm not going to do what you can easily do yourself. Have you ever heard the old maxim "Give a man a fish and he can eat for a day, give a man a fishing rod and he can eat for life". Your download of AS7 will be equipping you with a fairly operable fishing rod!

 

Great thing about AS7 is that, unlike AS4, it's not just an editor/debugger, it is now an editor/compiler/linker/debugger - it comes with a reasonably up to date avr-gcc included so delivers everything you need to load and build this avrub project. You will almost certainly want to edit bootcfg.h before you build to set your own choices for things like baud rate, bootloader base address and so on.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i will download now, i did new steps, to, so i start fresh

 

1. genconf aesconfig.txt

2. create -c aesconfig.txt -h bootldr.h -k aeskeys.h

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I simply take the "5.2" files , where can i take them from?can you lease send the link, i install now AS 7

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I gave the link in #17 from that page I just took the option for avrub_en.zip

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Released /5.2/avrub_en.zip  found-it i'm installing ;) thank you so much for your time and to the comunity!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i did get the same outputs as you but now how i put them together, i didn't add in the aeskeys.h bootloader.h from aesconfig.txt key file generated

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Can't help with that, until I googled it in #17 I'd never heard of this bootloader before today so I have no idea how you configure/build it with AES support. (though I did notice some "#ifdef decrypt" sprinkled across the source code).

 

EDIT: actually talking of that - when I Ctrl-Shift-F and search for "Decrypt" across the project I found this at line 140:

 

 

As the stuff from 154 onwards seems to depend on the definition on line 140 I think that as a minimum this needs to be "1" not "0". Also line 152 defines the algo as "PCI_128" by default. I'm guessing you actually want that to be "AES_128" or "AES_256" from the look of the code that follows.

 

Of, course, rather than guessing about all this you would kind of hope the author has written some design notes or user instructions somewhere that tells you how all this is supposed to work. Perhaps the 33K readme.htm in the file will be enlightening? In fact:

 

 

EDIT2: Actually the documentation is pretty crap - it doesn't say much more than mention the existence of "Decrypt". Although it mentions "Algorithm" it doesn't really say what the options you can set it to are.... well OK I guess you can see that in lines 142 to 150 ?

 

Personally I prefer to use (and write) software that is fully documented so the user is told exactly what they need to do to use it without having to guess stuff. (for example:  https://github.com/wrightflyer/sdbootloader )

Last Edited: Fri. Jan 10, 2020 - 03:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the stuff from 154 onwards seems to depend on the definition on line 140 I think that as a minimum this needs to be "1" not "0". Also line 152 defines the algo as "PCI_128" by default. I'm guessing you actually want that to be "AES_128" or "AES_256" from the look of the code that follows.

 

Of, course, rather than guessing about all this you would kind of hope the author has written some design notes or user instructions somewhere that tells you how all this is supposed to work. Perhaps the 33K readme.htm in the file will be enlightening? In fact:

 

you are so right what i get inside is a bad thing wht i think it mess everything up is that:

 

inside aeskeys.h :

__flash unsigned char kTable[32] =
{
    0x4f, 0xd6, 0xeb, 0x1c, 0xeb, 0x43, 0x21, 0x4b,
    0x2e, 0x4d, 0xc8, 0x3e, 0xda, 0xfd, 0xdd, 0xd1,

    0x43, 0x2a, 0x7d, 0x5e, 0x5b, 0xf7, 0x1a, 0xbe,

    0xf6, 0x13, 0x2c, 0xc6, 0xbb, 0x42, 0x67, 0xfa,
};

 

and inside: bootldr_h

 

#ifndef bootldr_h

#define bootldr_h

#define PAGE_SIZE 128
#define MEM_SIZE 14336 this is for atmega168 the right size, i mean
#define CRC_CHECK
#define SIGNATURE 0x059835D0
#define BUFFER_SIZE 148
#define INITIALVECTOR_3 0xFCC28B53
#define INITIALVECTOR_2 0x4485B2CE
#define INITIALVECTOR_1 0x3F90DEA6
#define INITIALVECTOR_0 0xE94103C9
#define KEY_COUNT 3

#endif // bootldr_h

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i found one of the problem:

 

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <avr/wdt.h>
#include <avr/eeprom.h>

#include "aesglobal.h"
#include "bootldr.h"
#include "loader.h"
#include "bus.h"
#include "crc.h"
#include "../../folder/global.h"

Edited as this:

#include "global.h"

 

i will ad that in the make folder and see how it do

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

<--- #32

Again I have no idea what you are talking about - is that still some old version you are looking at? The version of AVRUB I downloaded today (#17) has no file called aeskeys.h at all. It seems the only mention of keys are lines 156 to 169 in bootcfg.h that define either a [16] or [32] element array called DecryptKey

 

Presumably the plan is that you edit your own key into those 16 or 32 bytes depending on whether you choose to use AES_128 or AES_256.

 

Again this is where some .md would have helped a lot !!

 

If software is crap I'd avoid using it - maybe look at Microchip's own app note for their AES bootloader if you want to try a different one that maybe better documented (there's probably a reason why this AVRUB is not used much and seldom mentioned here!)

Last Edited: Fri. Jan 10, 2020 - 03:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

__flash unsigned char kTable[32] =
{
    0x4f, 0xd6, 0xeb, 0x1c, 0xeb, 0x43, 0x21, 0x4b,
    0x2e, 0x4d, 0xc8, 0x3e, 0xda, 0xfd, 0xdd, 0xd1,

    0x43, 0x2a, 0x7d, 0x5e, 0x5b, 0xf7, 0x1a, 0xbe,

    0xf6, 0x13, 0x2c, 0xc6, 0xbb, 0x42, 0x67, 0xfa,
};

 

Build started 10.1.2020 at 15:27:59
avr-gcc  -mmcu=atmega168 -Wall -gdwarf-2 -fno-tree-scev-cprop -mcall-prologues -fno-inline-small-functions   -DBAUD=250000UL          -DF_CPU=8000000UL -Os -fsigned-char -MD -MP -MT aes.o -MF dep/aes.o.d  -c  ../aes.c
In file included from ../aes.c:33:
../aeskeys.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
../aes.c: In function 'KeyExpansion':
../aes.c:323: error: 'kTable' undeclared (first use in this function)
../aes.c:323: error: (Each undeclared identifier is reported only once
../aes.c:323: error: for each function it appears in.)
make: *** [aes.o] Error 1
Build failed with 4 errors and 0 warnings...

 

 

__flash unsigned char kTable[32] = i must put 1 or zero here ? i think ?

is like function is not defined, right ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I give in - you are not listening to the advice I gave (ditch the old crap, try the latest version) so personally I'm out. Hopefully you can work this out on your own or with someone else's help. Did you google to see if there is support for "AVRUB" anywhere?

 

BTW I had a look at the PC side download too - it appears to be in some dialect of Pascal - perhaps Borland/Delphi/? Do you have what's need to build that part too?

 

(I still think that using the proven working solution from Atmel/Microchip looks like a better option if you need AES!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes i did used that, so sorry i tested on the old version as well, i make a screen of the folder is builded first so you can have a ideea of what was builded on,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i add the pictures, other way i can do i think is to import and to upgrade the project to the VS 7

 

i try to open the proj.cproj but it give eror, i manage to compile a 32kb .hex file if i open proj.prj in CodeVision AVR

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1


  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://www.pocketmagic.net/simp...

 

i start learning more, i think that is what he write in the code and i was geting the eror,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I give in - you are not listening to the advice

Not sure that he's wilfully ignoring you:

In the OP, chriszux  wrote:
i'm not good in programing

and, in #4, chriszux  wrote:
 i don't know programming and for me are like Chinse,

Rather, just doesn't have any programming skills or experience to understand the advice - let alone put it into practice.

Seems there is also a language barrier.

 

See #7.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Jan 10, 2020 - 09:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i try to learn, but who write it he did some strange settings, for example it use PD2 (INT0/PCINT18) and i want to disable that as i only need +/-/TX/RX

 

that's why i beter pay and get-it done proper, i'm only good at programing IC and some basics but when it go to programing is over my head :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chriszux wrote:
i beter pay and get-it done proper,

Indeed. Hence suggestion to move this to the 'Marketplace' forum - which is the place for buying & selling ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

where is that marketplace ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i found-it, thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the bootloader.b is refering to some commands was written someware in the code and are some mess up commands in there, that's why i get errors  the one you tested was refering to the comands in the folder and they was all in the right place, i'm sorry for my bad english :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Andy I wonder why you are being deliberately obtuse or is it just plain ignorance? The advice he's ignoring is my suggestion to ditch some old dinosaur he unearthed and instead use the latest from Source Forge which I've shown builds without error in AS7. This is nothing to do with C programming skills or the lack thereof. It's just plain common sense.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sir, i don't ignore you, but i get the same error is some mess up inside the folder that create the hex file,

 

And i Done with  with latest Studio :(

Last Edited: Sat. Jan 11, 2020 - 09:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I forgot to mention something, and i think there i was wrong from the project i have started From Begin, And I did this and i get them output files,becouse i did figred out i need the files to use for the AES Botloader.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No one contacted me, even if i want to pay no one do-it......

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i did compile but it still not run OK.

Last Edited: Wed. Jan 15, 2020 - 10:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PM sent!

/Jakob Selbing

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No mention of what currency the offer is in. It could be rupiah for all we know!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It does say $500 - but I guess the are various different "dollars" around ...

 

The vagueness doesn't inspire confidence to make a bid.

 

Perhaps would be better on somewhere like  https://www.freelancer.com/  or  https://www.peopleperhour.com/  ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm guessing the $ means USD and not the former imperial currency of my country, now used only in Cape Verde...

 

Anyway, I can't help, I'm not familiar with the software you are using to even make an assessment of the costsad

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i can Pay in BTC is the fastest Online payment this days.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When i Flash The IC atmega168/328 The Led's are two led one red and one blue are always on, when i restart the device but the blue LED Must flash like after 1,2 seconds after for 1, or 2 seconds, i think the reason is one is the byte are not at the correct address are 3 files .eep(1kb) .hex (intel)(38kb) and .rom(91kb) then i make the botloader but i don't think i make the bootloader correct, is posible the fuses can be the problem to.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just for the benefit of whoever attempts to do this it seems OP has dug up some ancient old piece of crap called AVRUB which is a bootloader (japanese with little sensible documentation) that purports to be able to do AES. It seems the PC side of things are written in a dialect of Pascal called Lazarus. There could be all types of issue at either end (encrypting the image or the bootloader decrypting/flashing).

 

If I was doing this I would forget that completely. Go to Microchip, get their app note and code for their own AES bootloader (which includes source for the PC tool) and concentrate on making that work. You are far more likely to find knowledge/support for the use of that than this anonymous other software.

 

EDIT: That is.

 

https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en591242

 

having sid that there also seem so tbe:

 

http://atmel-studio-doc.s3-website-us-east-1.amazonaws.com/webhelp/GUID-E67D40A5-DD02-4379-82B4-9BE2A7E7BEA0-en-US-2/index.html

 

Not entirely clear (without further study) how "AVR231" and "AN2462" are related. Perhaps they are really two names for the same thing??

Last Edited: Wed. Jan 15, 2020 - 01:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
AVRUB

Presumably not this:  https://www.avrub.com/

 

But this:  https://sourceforge.net/projects/avrub/

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your time, i will Not try any more as it looks like is true what clawson mentioned the hex file it generate is like incomplete or invalid i think.

 

Thank you everyone for trying to help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
But this
Yes, the latter. For those interested/concerned take a read through this entire thread and see how it progressed. I did find that if I got the latest issue of AVRUB (5.2) from Sourceforge that AS7 was happy to build it without error but there is some configuring to be done (bootcfg.h). You need to switch on encryption (Decrypt = 1) and you need to pick the algorithm (presumably AES-128 or AES-256) then you need to ensure that the "key" array is actually set to your AES key. But this is when your fun may start as you need something to build the encrypted packages you will deliver to the bootloader and this is where the PC side Lazarus project comes in. Presumably you have to ensure it uses the same AES key and then you have to be able to build it after updating? That could be "fun". Now maybe "Lazarus" is something that's easy to install and use and building the PC app turns out to be easy. But if you hit an issue there you could find yourself all at sea!

 

PS Lazarus is this I guess:  https://www.lazarus-ide.org/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


clawson wrote:
Perhaps they are really two names for the same thing??

I think so:

  • AVRxxx are the old Atmel names;
  • ANyyyy are the new Microchip names.

 

eg, 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the PC part use 32 digits to decrypt the downloaded File from the Memory and is one more Atmel Memory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lazarus  is ok is just 1234 and 32 digits written in the IC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

inside bootldr.c

 

//=============================================================================
// Starts here!
//=============================================================================

/**
 *
 * The bootloader is disabled by default, so we can program the
 * firmware together with the bootloader and the device will
 * work.
 *
 * ACTIVATION:
 *  1. By writing the eeprom when programming the bootloader.
 *  2. When the app section fails the CRC check. This will also
 * hang the bootloader so it won't result in an endless loop
 * that rewrites the eeprom continuously (when the cable is not
 *  plugged in). This hang is in here because there is no more
 *  space to write any other instruction.
 *  3. By the application.
 *
 *  DEACTIVATION:
 *
 *  The bootloader can be deactivated after a successful
 *  programming.
 *
 *
 */

int main(void)
{
    /** seting up the reset pin is not really required because if
     *  the device is rebooting during firmware update, it can
     *  always be programed later; however it is a good idea to
     *  set set it in order to avoid troubles */
    PORTC = PORTC_VALUE;

    // enable pullup - give port time to settle
    busInit();

    // Loop forever (loops only if Application Section is damaged)
    for(;;)
    {
        if (eeprom_read_byte((uint8_t*)BOOTLOADER_FLAG_ADDR) == BOOTLOADER_FLAG_ENABLE)
        {
            loader();
        }

    #if defined(CRC_CHECK)
        // Check that the Application Section contents is undamaged
        // by calculating the CRC of the whole memory.
        {
            #ifndef RAMPZ
                uint16_t p = 0x000000;
            #else
                uint32_t p = 0x000000;
            #endif

            uint16_t crc = 0;

            do
            {
            #ifndef RAMPZ
                crc = CRC(crc, pgm_read_byte(p));
            #else
                crc = CRC(crc, pgm_read_byte_far(p));
            #endif
            }
            while (++p < MEM_SIZE);

            // Application Section damaged or forced into bootloader mode by connector
            //   -> do not jump to Reset Vector of the Application Section
            if(crc)
            {
                eeprom_write_byte((uint8_t*)BOOTLOADER_FLAG_ADDR, BOOTLOADER_FLAG_ENABLE);
                for(;;); /* hang to avoid executing invalid apps or rewrite eeprom when the cable is unplugged */
            }
        }
    #endif

        asm volatile ("jmp 0");
    }

}

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

you are right, the create folder is created to make the specific bootloader, and i think there is the problem,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you all for help.