Warning: session_start() [function.session-start]: open(/tmp/sess_ahvpqb1j51v8gv0qnmu0027t27, O_RDWR) failed: Disk quota exceeded (122) in /home/v5sofge/public_html/vechi/kernel/session.php on line 94
Projects - SOFGEL
DOWNLOAD
Login to reply
EasyBootAVR 1.3
Author
Gheorghe Bic
Ultima actualizare
18-06-2011 06:00:10
Editor rating
0
Vizualizari
4071

EasyBootAVR 1.3

 

How it works?

Just download the zip archive and unzip it in the folder that you want to use it and is ready.

EasyBootAVR do not use the AVR109 protocol. The application .hex file is downloded in a binary form.

All data and commands are transmitted with a check sum byte. This release do not use CRC.

This release do not use data encryption.

Supported devices:

 - AT90CAN128

 - AT90CAN32

 - AT90CAN64

 - AT90PWM2

 - AT90PWM216

 - AT90PWM2B

 - AT90PWM3

 - AT90PWM316

 - AT90PWM3B

 - ATmega128

 - ATmega1280

 - ATmega1281

 - ATmega16

 - ATmega162

 - ATmega164

 - ATmega168

 - ATmega169

 - ATmega2560

 - ATmega2561

 - ATmega32

 - ATmega324

 - ATmega328

 - ATmega329

 - ATmega3290

 - ATmega64

 - ATmega644

 - ATmega649

 - ATmega6490

 - ATmega8

 - ATmega8515

 - ATmega88

and the related versions L, P, PA.

Using EasyBootAVR involve three steps:

1: create the bootloader firmware

2: write the bootloader firmware into the device, using a programmer

3: download the application firmware into the device using EasyBootAVR

4: One Click Programming

 

1: Create the bootloader firmware

In order to create the bootloader firmware:

- select the device that you are using from the 'Device' drop down list

- type in the oscillator frequency in the 'Osc. Freq.' edit box (actually the USART input frequency when not the same with the oscillator frequency)

- select the bootloader memory size from the 'BLS Size' drop down list (words). This value MUST be the same with that one selected when set the fuses

- select the communication speed from the 'Baud rate' drop down list. This value MUST be the same with the one that the PC uses

- select the UART module if more than one is available

- type a serial number if needed (max 32 characters) and will be aligned at the end of the flash memory

- click the 'Generate the BootLoader firmware' button. A file named 'eba.hex' will be generated in the active directory. The firmware size is less than 256words.

 

3: Download the application firmware into device using EasyBootAVR.

The settings regarding device, baud rate, boot size section must be the same when the bootloader firmware has been built.

To enter the bootloader, there are two possibilities:

- to reset the device

- to send a string that the application firmware will recognize and make a jump to the bootloader section

After a reset, the bootloader will wait for a valid ReadFuse command from the PC side, around 0.7 seconds. If a valid command has come, then the bootloader will keep the control, otherwise will check the last word in the application area. If it is different than 0xFFFF, then a IJUMP (EIJMP) to 0x0000 will be made in case the ResetDevice check box is checked.

The bootloader firmware start with a CLI instruction followed by a WDR instruction. I handle the watchdog timer, by reseting it enough fast in order to not triger a reset.

The firmware do not use interrupts.

As for periferals, it uses only the UART module, the UART0 for devices with more than one UART module.

On exit, it clear the register UCSRxB, turning off the UARTx module. It is the only register cleared before the indirect jump to 0x0.

In the PC side, if a string is present in the 'Jump to BL string' text box, then this string will be sent first. This string must be a hexadecimal notation, but without '0x' and without spaces. For example instead 0x32 0x13 0x10, should be simply 321310.

If no such string is present in the text box, then the PC software will start to send the ReadFuse command. This will be sent endlessly every few hundreds of second.

If the communication is established, then the PC side will do all checked tasks.

If the WriteFlash check box is checked, then the last page in the application area will be erased first.

If the check box 'Erase flash' is checked, then all application flash area will be erased. If not, then only pages supposed to be writen will be erased.

When a page is erased, the Z register is saved in one double register, in case the page need to be verified after writen. In this way, it is possible to read (for verification purpose) only pages that have just been erased and writen. This means, it is not possible to read back the application firmware before to erase and write it.

Writing the application firmware, needs the .hex file that contain the firmware. Note that this EasyBootAVR version do not check the .hex file for integrity. The user should make sure the .hex file is valid.

If the 'VerifyFlash' check box is checked, then only pages present in the hex file provided will be verified after have been erased and writen. So the status bar that shows the progress, will not start from the begining to show the verification progress, since the verification is done page by page as it is erased and writen.

The EEPROM memory is erased and writen byte by byte. If the erase EEPROM is needed, then all location will be writen. Those that are missing from the .eep file, will be writen with 0xFF.

 

4: One Click Programming
 When the microcontroller is programmed for the first time, it is possible to do it through a programmer.

 To program in this way, a series of settings must be provided.

 After the 'Program' button is pressed the following steps are performed:

 - the EasyBootAVR bootloader firmware is generated

 - the Serial Number will be added at the end of the flash memory if is not null

 - the 'write successful' mark is writen at the end of the application area (two bytes)

 - the application firmware provided by the user is writen on top of the existing information. The user have to take care the existing data (the EasyBootAVR bootloader firmware, serial number, the mark)  to not be overwriten. However, there is an advantage in this mechanism, the user can rewrite his own bootloader firmware, and keeping the Serial Number. If the user want to add a 'calibration section' to the firmware, this information have to be in the same .hex file with the application firmware provided by the user, starting after the bootloader firmware and ending before the Serial Number.

 - the programmer command line software is started and a DOS window will appear.

 The settings for the programmer are read at the moment the EasyBootAVR is started. This means, if changes are made to the .ini file where the settings are read from, the software have to be closed and started again.

 In the .ini file there is a section [Prog] where two information about the programmer have to be filled:

 - the exe file

 - the parameters

 

For more information, for additional devices to be added or to report a bug, write an email to info@sofgel.ro, or sign in and post a question in the forum, or the webiste www.avrfreaks.net can be very helpfull on this regard.

The author.


Warning: Unknown: open(/tmp/sess_ahvpqb1j51v8gv0qnmu0027t27, O_RDWR) failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0