Usually AVR chips include flash, eeprom, fuse, lockbits, user signature and other non-volatile contents that need to be burned into the chip during programming. Among them, the fuse part can only be rewritten by an external programmer, and the application itself cannot be changed.
During ISP burning, users want to complete the burning with a single action such as clicking a button, which requires combining the actions of erasing, burning, and comparing in different parts. ELF format can be used to achieve this goal. The target file in ELF format can contain different area segments, and the download tool can extract and burn them to the corresponding locations respectively.
1) Software development using Atmel Studio 6
If the developer uses Atmel Studio 6 (or AVR Studio 4/5, anyway, GCC is fine) to write the user's source code, avr glibc provides a set of methods to specify the values of these different areas in the source code.
If you want to generate an ELF file that contains a chip ID segment, you can use it to compare the ELF Production file before downloading it to see if it matches the download file of the current device. This step only requires adding the header file #include
[cpp] view plain copy
const unsigned char __signature[3] __attribute__((section (".signature"))) =
{ SIGNATURE_2, SIGNATURE_1, SIGNATURE_0 };
2) Software development using IAR AVR
Since IAR extended syntax cannot support the definition of fuses, lockbits and other bits, IAR can only produce single FLASH content, usually in HEX format.
At this time, you need to use the ELF Production File Fomart function in AVR Studio 4: after selecting the HEX file location of flash and eeprom, go to the fuse and lockbits pages to check the corresponding configuration, then come back to set the ELF file path to be generated, and click Save to let AVR Studio 4 generate an ELF file format containing the contents of each segment. You can simply click the Program button or use the command line tool atprogram.exe to burn it.
Previous article:AVR counter - how to calculate the initial value of the count
Next article:STM32F407 GPIO (operation register)
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- A brief introduction to the use of the console for learning common components of RT-Thread
- How to derive the w/w0 result in the low-pass response in the fourth edition of Circuit Design Based on Operational Amplifiers and Analog Integrated Circuits...
- Advantages and disadvantages of flyback, forward, push-pull, half-bridge and full-bridge switching power supplies!
- Connecting a stepper motor using the MSP430G2 LaunchPad
- [RVB2601 Creative Application Development] User Experience 03 -- System Timer
- CH224 Preliminary Function Test
- [RVB2601 Creative Application Development] User Experience 07 -- Code Tracking Based on NTP
- [2022 Digi-Key Innovation Design Competition] - Intelligent Animal Identification System Based on Raspberry Pi
- CC2652RB SimpleLink Crystal-less BAW Multi-Protocol 2.4GHz Wireless MCU
- EEWORLD University Hall----[High Precision Laboratory] Interface: 9 USB