|
| 1 | +# Changes since AVR-LibC-2.2.0 |
| 2 | + |
| 3 | +## General |
| 4 | + |
| 5 | +## ABI and API Changes |
| 6 | + |
| 7 | +- Part of the startup code is now optional and has been moved from |
| 8 | + `gcrt1.S` to the device support lib `lib<mcu>.a`. When the respective |
| 9 | + parts of the startup code are not wanted, a specific symbol can be |
| 10 | + defined so that the associated code is no more pulled in. |
| 11 | + - Define `__init_sp` to skip the setting of SP in `.init2` (#1011). |
| 12 | + - Define `__init_cvt` to skip setting CPUINT_CTRLA.CPUINT_CVT in |
| 13 | + `.init3` (#1010). |
| 14 | + - Define `__call_main` to skip calling `main` and `exit` |
| 15 | + in `.init9` (#1012).<br> |
| 16 | + `main` must be executed by other means, e.g. by putting it in |
| 17 | + section `.init9`. This feature is supported by |
| 18 | + [-mno-call-main](https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html#index-mno-call-main) |
| 19 | + since [GCC v15](https://gcc.gnu.org/gcc-15/changes.html#avr). |
| 20 | + |
| 21 | +## Improvements and Additions |
| 22 | + |
| 23 | +- Support has been added for: ATxmega16E5, ATA5791, ATA8210, ATA8510 (#876). |
| 24 | + |
| 25 | +- Support has been added for the `stpcpy`, `stpcpy_P`, `stpcpy_F`, |
| 26 | + `stpcpy_PF`, `stpcpy_FX` functions (#1015). |
| 27 | + |
| 28 | +- Support has been added for some functions on Reduced Tiny (AVRrc): |
| 29 | + `memmem`, `memmem_P`, `strlcpy`, `strlcpy_P`, `strcasestr`, `strcasestr_P`, |
| 30 | + `strspn`, `strspn_P`, `strcspn`, `strcspn_P`, `strlcat_P`, `strsep`, |
| 31 | + `strsep_P`, `strpbrk_P`, `strtok_rP`, `ltoa`, `ultoa`. |
| 32 | + |
| 33 | +- Support has beed added for the ISO/IEC TR 18037 functions |
| 34 | + `rdivi`, `urdivi`, `lrdivi`, `ulrdivi` (#999). |
| 35 | + |
| 36 | +- Support a new header |
| 37 | + [<avr/flash.h>](https://avrdudes.github.io/avr-libc/avr-libc-user-manual/group__avr__flash.html#details) |
| 38 | + for better support of avr-gcc's |
| 39 | + named address spaces `__flash` and `__flashx`. For example, it provides |
| 40 | + functions like `strcpy_F` and `strcpy_FX` that work |
| 41 | + the same like `strcpy_P` and `strcpy_PF` from |
| 42 | + `<avr/pgmspace.h>`, but use proper address-space qualifiers. |
| 43 | + |
| 44 | +- Support for Compact Vector Tables has been added as #1010. |
| 45 | + It is provided by `crt<mcu>-cvt.o`. One way to use that variant |
| 46 | + of the startup code is by means of avr-gcc |
| 47 | + [-mcvt](https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html#index-mcvt) |
| 48 | + which is supported since GCC v15. |
| 49 | + |
| 50 | +- Support the `ISR_N` macro in |
| 51 | + [avr/interrupt.h](https://avrdudes.github.io/avr-libc/avr-libc-user-manual/group__avr__interrupts.html#details). |
| 52 | + This allows to specify |
| 53 | + the IRQ number as an argument to the signal attribute, which is supported |
| 54 | + since GCC v15 [PR116056](https://gcc.gnu.org/PR116056). |
| 55 | + It allows to use static functions or functions |
| 56 | + defined in a C++ namespace as an ISR. It also allows to define ISR |
| 57 | + aliases without the penalty of an additional JMP/RJMP instruction (#765). |
| 58 | + |
| 59 | +- The C/C++ register footprint of some common simple functions has |
| 60 | + been improved by implementing them as extern inline assembly stubs: |
| 61 | + `strlen`, `strlen_P`, `strcpy`, `strcpy_P`, `strcmp`, `strcmp_P`, |
| 62 | + `memcpy_P` (#1013). |
| 63 | + |
| 64 | +- `common/asmdef.h` used a sub-optimal definition of XJMP and XCALL (#993). |
| 65 | + Outcome was a sub-optimal code generation for some devices like the |
| 66 | + ones in `avrxmega3/short-calls`. |
| 67 | + |
| 68 | +- avr-gcc v15 and up issues a diagnostic for `__int24` and `__uint24` when |
| 69 | + `-pedantic` or similar options are on. Hence `__extension__` was |
| 70 | + added when using these types in `avr/pgmspace.h`. |
| 71 | + |
| 72 | +## Issues closed |
| 73 | + |
| 74 | +- Since v2.2.0 (#936), `gcrt1.S` defines symbols `__DATA_REGION_ORIGIN__` |
| 75 | + and `__DATA_REGION_LENGTH__` to allow for more precise diagnostics from |
| 76 | + the linker when the data region overflows. However, letting `.data` start |
| 77 | + at `__DATA_REGION_ORIGIN__` is a relatively new addition in Binutils v2.40 |
| 78 | + [PR29741](https://sourceware.org/PR29741), |
| 79 | + whereas using `__DATA_REGION_LENGTH__` for `.data` size is a much |
| 80 | + older addition. |
| 81 | + |
| 82 | + Outcome may be that the linker script adopts the true |
| 83 | + size of `.data` but not its start address, resulting in incorrect errors |
| 84 | + from the linker (#971). In order to resolve #971, a configure |
| 85 | + test has been added that checks for PR29741, and only defines the mentioned |
| 86 | + symbols when PR29741 is available. |
| 87 | + |
| 88 | + A similar test has been added for [PR31177](https://sourceware.org/PR31177) |
| 89 | + which is a similar feature for the `.text` region. |
| 90 | + |
| 91 | +- On Reduced Tiny, add 0x4000 to the symbol address when |
| 92 | + `pgm_get_far_address()` takes the address of an object in `PROGMEM_FAR`. |
| 93 | + This works similar to how the compiler implements the &-operator |
| 94 | + for `PROGMEM` objects (#970). |
| 95 | + |
| 96 | +- Fixed `memccpy` (and `memccpy_P`) on AVRrc (#1018). |
| 97 | + |
| 98 | +- Fixed `atoi` and `atol` on AVRrc (#1019). |
| 99 | + |
| 100 | +- Define types from `stdint.h` like `int32_t` without `attribute((mode))`. |
| 101 | + (#496) |
| 102 | + |
| 103 | +- Fixed `ld: undefined reference to E2END` (#973) |
| 104 | + |
| 105 | +- Don't skip 2-word instructions on cores with an according silicon bug. |
| 106 | + This will fix AVR-LibC build warnings as mentioned in #994 like:<br> |
| 107 | + `libc/stdlib/ctype.S:80: Warning: skipping two-word instruction` |
| 108 | + |
| 109 | +- The `str[n]casecmp_PF` functions used an algorithm that lead to different |
| 110 | + results compared to `str[n]casecmp[_P]`. The far versions have been |
| 111 | + fixed so that they comply to POSIX.1-2008. (#1009) |
| 112 | + |
| 113 | +- `fflush()` is now implemented as a proper (non-inline) function so that |
| 114 | + features like `-wrap` will work as expected (#1017, #1003). |
| 115 | + |
| 116 | +## Pull Requests |
| 117 | + |
| 118 | +- Improve runtime performance of `free()` (#991). |
| 119 | + |
| 120 | +## Other Changes |
| 121 | + |
| 122 | +- New news are now in `NEWS.md` and no more in `NEWS`. |
0 commit comments