Looking for info about __AVR_ARCH__ in GCC for use in VScode.

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

This is what GCC has to say about it.

 

 

https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/AVR-Options.html

 

I ran into problems with EEPROM on AVR128da,  Microchip Studio builds fine, but my Makefile does not like the EEPROM. On VScode, Intelasense thinks I have an "avr2" device, it is probably the same issue with Makefile. I can feed VScode (and Makefile) the define to be an "avrxmega4" device, but I wonder if there is another way that I am missing. Anyone know where Microchip Studio (e.g. new AS7) gets __AVR_ARCH__ from to pass to the toolchain.

 

 

Last Edited: Sun. Dec 6, 2020 - 09:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

__AVR_ARCH__ is a generated macro which gets its information from the -mmcu= option, so no need to touch it as it is effectively a read only value provided for the user. It is used to figure out in code which avr family you are dealing with-

#if __AVR_ARCH__ == 104

do something this way

#endif

 

 

Enable verbose option when compiling (-v) so you can see what your toolchain is up to.

 

You are probably getting the default specs since the da specs cannot be found-

Reading specs from /opt/avr-gcc-7.3.0-atmel3.6.1-arduino-x86_64/bin/../lib/gcc/avr/7.3.0/device-specs/specs-avr2

 

The above is arduino toolchain, which does have the spec files, but it does not have the da series so looks like it just uses a default.

 

what you want to see for a 128da28-

Reading specs from /opt/microchip/mplabx/v5.40/packs/Microchip/AVR-Dx_DFP/1.1.40/gcc/dev/avr128da32/device-specs/specs-avr128da32

or similar- this is using mplabx which uses the -B option to point to the spec file location, and mplabx points to its 'packs' folders in this case.

 

I would assume it would be simple enough to grab the needed files in a 'pack' and add them to the existing toolchain- the spec file to wherever the others are- lib/gcc/avr/...  and avr/lib/... for the mcu specific startup file and lib_mcuname_.a (and I guess whatever else there is, like includes). Or you use a -B option when using a 'pack' and that mcu specific info lives in its own location.

 

 

Last Edited: Sun. Dec 6, 2020 - 09:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

From gcc-8.3.0/gcc/config/avr/avr-c.it looks it is generated internally.

 

void
avr_cpu_cpp_builtins (struct cpp_reader *pfile)
{
  builtin_define_std ("AVR");

  /* __AVR_DEVICE_NAME__ and  avr_mcu_types[].macro like __AVR_ATmega8__
     are defined by -D command option, see device-specs file.  */

  if (avr_arch->macro)
    cpp_define_formatted (pfile, "__AVR_ARCH__=%s", avr_arch->macro);
  if (AVR_HAVE_RAMPD)    cpp_define (pfile, "__AVR_HAVE_RAMPD__");
  if (AVR_HAVE_RAMPX)    cpp_define (pfile, "__AVR_HAVE_RAMPX__");
  if (AVR_HAVE_RAMPY)    cpp_define (pfile, "__AVR_HAVE_RAMPY__");
  if (AVR_HAVE_RAMPZ)    cpp_define (pfile, "__AVR_HAVE_RAMPZ__");
  if (AVR_HAVE_ELPM)     cpp_define (pfile, "__AVR_HAVE_ELPM__");
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

If it is injected in the packs, then it comes from the part specific spec file (I actually can't remember which case it is for this define)

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

It looks like it should be mentioned on the first line of the "Specs" files contained in the packs.

Ie:

 

 grep -R Auto-generated /Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev/
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128da28/device-specs/specs-avr128da28:# Auto-generated specs for AVR device avr128da28 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128da32/device-specs/specs-avr128da32:# Auto-generated specs for AVR device avr128da32 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128da48/device-specs/specs-avr128da48:# Auto-generated specs for AVR device avr128da48 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128da64/device-specs/specs-avr128da64:# Auto-generated specs for AVR device avr128da64 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128db28/device-specs/specs-avr128db28:# Auto-generated specs for AVR device avr128db28 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128db32/device-specs/specs-avr128db32:# Auto-generated specs for AVR device avr128db32 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128db48/device-specs/specs-avr128db48:# Auto-generated specs for AVR device avr128db48 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr128db64/device-specs/specs-avr128db64:# Auto-generated specs for AVR device avr128db64 (core avrxmega4, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr32da28/device-specs/specs-avr32da28:# Auto-generated specs for AVR device avr32da28 (core avrxmega3, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr32da32/device-specs/specs-avr32da32:# Auto-generated specs for AVR device avr32da32 (core avrxmega3, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr32da48/device-specs/specs-avr32da48:# Auto-generated specs for AVR device avr32da48 (core avrxmega3, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr32db28/device-specs/specs-avr32db28:# Auto-generated specs for AVR device avr32db28 (core avrxmega3, 16-bit SP)

/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr64da48/device-specs/specs-avr64da48:# Auto-generated specs for AVR device avr64da48 (core avrxmega2, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr64da64/device-specs/specs-avr64da64:# Auto-generated specs for AVR device avr64da64 (core avrxmega2, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr64db28/device-specs/specs-avr64db28:# Auto-generated specs for AVR device avr64db28 (core avrxmega2, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr64db32/device-specs/specs-avr64db32:# Auto-generated specs for AVR device avr64db32 (core avrxmega2, 16-bit SP)
/Downloads/Atmel.AVR-Dx_DFP.1.6.76/gcc/dev//avr64db48/device-specs/specs-avr64db48:# Auto-generated specs for AVR device avr64db48 (core avrxmega2, 16-bit SP)

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

>but my Makefile does not like the EEPROM

 

Ultimately the avr-libc eeprom functions for a 128da28 come from libavr128da28.a, which is in the same location as the crt startup file for the mcu. Since those eeprom functions have already been compiled for a specific mcu, the choice of what code was used by avr-libc to compile the library for that avr (#if __AVR_XMEGA__) has already been done. The only way to get the correct set of eeprom functions, is to get the correct specs file in use so the correct lib_mcu_.a file is also used (along with some other important mcu info).

 

Bottom line- you need to tell the compiler where the specs file is located, or either some of these mcu specific files simply need to be in a place its already looking. To kick it all off in the right direction, the -mmcu= option is used.

 

 

This is how I made 7.3.0 work for a 128da28 (without mplabx, and without having to specify where these files are located)-

 

Files from the 'packs'-

crtavr128da28.o
libavr128da28.a
copied to ->avr/lib/avrxmega4/

 

specs-avr128da28
copied to ->lib/gcc/avr/7.3.0/device-specs/

 

ioavr128da28.h
copied to ->avr/include/avr/

 

Now at the command line when specifying -mmcu=avr128da28, it will use the 'avr128da28' to find the specs (in an already searched folder), once it has the specs, the startup file and library can be found (also in folders where the compiler can find them by default).

 

Although I did test the above at the command line, using an eeprom function, its possible the above file list is missing something so the better idea is probably to just use the packs as intended and use the -B option to point to where the mcu pack info is located (and the -I to find the include).

Last Edited: Mon. Dec 7, 2020 - 08:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Much thanks.

 

This is one of the Makefiles from a test app  (but have not check-in the EEPROM test app).  

 

https://github.com/epccs/MacGyver/blob/master/Applications/Adc/Makefile#L49

 

The -I and -B are present and should be going to the right places, e.g. from the AVR-Dx_DFP atpack.

 

https://github.com/epccs/MacGyver/tree/master/Applications/lib/AVR-Dx_DFP/gcc/dev/avr128da28

 

I guess VScode is going to need a definition if I want it to look inside eeprom.h correctly. First I will sort that then the test program, which may have other problems (maybe I got something goofed up in the Makefile that I did not show).

 

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

Welp, it is working finally; it turns out eeprom.h has some updates between MC's 3.6.1 (packaged on Debian) and 3.6.2. That is the first difference I have seen. I have copied the needed one into my repo and will use it from there, and __AVR_ARCH__ for VScode is linked.

 

https://github.com/epccs/MacGyver/commit/fd4ea0ab3fe6083ff32fa11f2b62391ee45a0ac0#diff-92eda83a383e369ea90f76dd21d1131473d9fe4f95180f621aae3b58514447a2R10

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

3.6.1

#elif    defined (__AVR_XMEGA__) && __AVR_XMEGA__
# define eeprom_is_ready()    bit_is_clear (NVM_STATUS, NVM_NVMBUSY_bp)

//avr0/1 and da will end up in the default option (EECR,EEWE)

 

3.6.2

#elif    defined (NVMCTRL_STATUS)
# define eeprom_is_ready()    bit_is_clear (NVMCTRL_STATUS, NVMCTRL_EEBUSY_bp)  //<-avr0/1 and da would end up here

 

That is the only difference, where 3.6.2 allows for the newer register names. If using 3.6.1, you would get the default eeprom_is_ready version (last one). No error message about using EECR/EEWE? If seen, that error would have been a good clue.

 

 

 

 

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

I was using VScode to light up the code that should be compiled, it would not light up the code for __AVR_XMEGA__ define, but it did light up this code.

 

 

I think eeprom_is_ready() was one of the errors... welp hell, I will go back and check; it may be educational.

 

 

 

Update: so it looks like the compiler gets __AVR_XMEGA__ defined, but I don't see where that happens.

Last Edited: Tue. Dec 8, 2020 - 02:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

>__AVR_XMEGA__ defined, but I don't see where that happens.

 

That is also a built-in define and it also applies to the avr0/1 and the newer da, so with the old header it was trying to use the original xmega NVM_ names. Which I guess is why they had to then change eeprom.h to distinguish the xmega's by nvm name (NVM vs NVMCTRL). So I guess it makes sense after all (my EECR/EEWE conclusion was wrong).

 

 

I didn't realize the DA nvm controller was quite a bit different than the avr0/1, although similar. It looks like the downside to the DA when using eeprom is it only does a byte at a time, which means more than 1 byte write to eeprom ends up blocking. With the avr 0/1 you are writing to a page buffer and when done with updating a page you can do the erase/write and continue on your way letting the cpu do work.

 

The upside to the DA is you do not have to deal with page boundaries, but I think the avr0/1 beats it for ease of use even though you have to split your eeprom sections into pages to pull it off-

https://godbolt.org/z/YETPca

this takes advantage of the memory mapped nature of eeprom as much as possible, and with c++ you could hide the write but would then be stuck in a single write similar to the DA (although it would be a var size write, not a byte size write). This c version looks like it would be a nice way to run an eeprom on the avr0/1, instead of having to go through all the ee functions.

Last Edited: Tue. Dec 8, 2020 - 09:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem with a lot of code browsers is that they simply can't account for "automatic defines". If you do this:

D:\>avr-gcc -mmcu=atmega328 -E -dM - < nul
#define __DBL_MIN_EXP__ (-125)
#define __HQ_FBIT__ 15
#define __UINT_LEAST16_MAX__ 0xffffU
#define __ATOMIC_ACQUIRE 2
#define __SFRACT_IBIT__ 0
#define __FLT_MIN__ 1.17549435e-38F
#define __GCC_IEC_559_COMPLEX 0
#define __BUILTIN_AVR_SLEEP 1
#define __BUILTIN_AVR_COUNTLSULLK 1
#define __BUILTIN_AVR_COUNTLSULLR 1
#define __UFRACT_MAX__ 0XFFFFP-16UR
#define __UINT_LEAST8_TYPE__ unsigned char
#define __DQ_FBIT__ 63
#define __INTMAX_C(c) c ## LL
#define __ULFRACT_FBIT__ 32
#define __SACCUM_EPSILON__ 0x1P-7HK
#define __CHAR_BIT__ 8
#define __USQ_IBIT__ 0
#define __UINT8_MAX__ 0xff
#define __ACCUM_FBIT__ 15
#define __WINT_MAX__ 0xffffU
#define __USFRACT_FBIT__ 8
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffU
#define __WCHAR_MAX__ 0x7fff
#define __LACCUM_IBIT__ 32
#define __DBL_DENORM_MIN__ ((double)1.40129846e-45L)
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __GCC_IEC_559 0
#define __FLT_EVAL_METHOD__ 0
#define __BUILTIN_AVR_LLKBITS 1
#define __LLACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-47LLK
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __BUILTIN_AVR_HKBITS 1
#define __BUILTIN_AVR_BITSLLK 1
#define __FRACT_FBIT__ 15
#define __BUILTIN_AVR_BITSLLR 1
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __SIG_ATOMIC_TYPE__ char
#define __BUILTIN_AVR_UHKBITS 1
#define __UACCUM_FBIT__ 16
#define __DBL_MIN_10_EXP__ (-37)
#define __FINITE_MATH_ONLY__ 0
#define __FLASH 1
#define __LFRACT_IBIT__ 0
#define __GNUC_PATCHLEVEL__ 0
#define __AVR_MEGA__ 1
#define __LFRACT_MAX__ 0X7FFFFFFFP-31LR
#define __UINT_FAST8_MAX__ 0xff
#define __has_include(STR) __has_include__(STR)
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __SA_FBIT__ 15
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 3.40282347e+38L
#define __FRACT_MAX__ 0X7FFFP-15R
#define __UFRACT_FBIT__ 16
#define __UFRACT_MIN__ 0.0UR
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define __UINTMAX_TYPE__ long long unsigned int
#define __LLFRACT_EPSILON__ 0x1P-63LLR
#define __BUILTIN_AVR_DELAY_CYCLES 1
#define __DEC32_EPSILON__ 1E-6DF
#define __UINT32_MAX__ 0xffffffffUL
#define __ULFRACT_MAX__ 0XFFFFFFFFP-32ULR
#define __TA_IBIT__ 16
#define __LDBL_MAX_EXP__ 128
#define __WINT_MIN__ 0U
#define __ULLFRACT_MIN__ 0.0ULLR
#define __SCHAR_MAX__ 0x7f
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## LL
#define __DBL_DIG__ 6
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define __AVR_HAVE_SPH__ 1
#define __LLACCUM_MIN__ (-0X1P15LLK-0X1P15LLK)
#define __BUILTIN_AVR_KBITS 1
#define __BUILTIN_AVR_ABSK 1
#define __BUILTIN_AVR_ABSR 1
#define __SIZEOF_INT__ 2
#define __SIZEOF_POINTER__ 2
#define __USACCUM_IBIT__ 8
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LFRACT_MIN__ (-0.5LR-0.5LR)
#define __HA_IBIT__ 8
#define __TQ_IBIT__ 0
#define __FLT_EPSILON__ 1.19209290e-7F
#define __USFRACT_IBIT__ 0
#define __LDBL_MIN__ 1.17549435e-38L
#define __STDC_UTF_16__ 1
#define __FRACT_MIN__ (-0.5R-0.5R)
#define __AVR_SFR_OFFSET__ 0x20
#define __DEC32_MAX__ 9.999999E96DF
#define __DA_IBIT__ 32
#define __INT32_MAX__ 0x7fffffffL
#define __UQQ_FBIT__ 8
#define __SIZEOF_LONG__ 4
#define __UACCUM_MAX__ 0XFFFFFFFFP-16UK
#define __UINT16_C(c) c ## U
#define __DECIMAL_DIG__ 9
#define __LFRACT_EPSILON__ 0x1P-31LR
#define __AVR_2_BYTE_PC__ 1
#define __ULFRACT_MIN__ 0.0ULR
#define __has_include_next(STR) __has_include_next__(STR)
#define __BUILTIN_AVR_ULLRBITS 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __ULACCUM_IBIT__ 32
#define __UACCUM_EPSILON__ 0x1P-16UK
#define __BUILTIN_AVR_SEI 1
#define __GNUC__ 5
#define __ULLACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-48ULLK
#define __HQ_IBIT__ 0
#define __BUILTIN_AVR_SWAP 1
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 4
#define __BIGGEST_ALIGNMENT__ 1
#define __UINT24_MAX__ 16777215UL
#define __BUILTIN_AVR_NOP 1
#define __GNUC_STDC_INLINE__ 1
#define __DQ_IBIT__ 0
#define __DBL_MAX__ ((double)3.40282347e+38L)
#define __ULFRACT_IBIT__ 0
#define __INT_FAST32_MAX__ 0x7fffffffL
#define __DBL_HAS_INFINITY__ 1
#define __ACCUM_IBIT__ 16
#define __DEC32_MIN_EXP__ (-94)
#define __BUILTIN_AVR_UKBITS 1
#define __BUILTIN_AVR_FMULSU 1
#define __LACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-31LK
#define __INT_FAST16_TYPE__ int
#define __LDBL_HAS_DENORM__ 1
#define __BUILTIN_AVR_BITSK 1
#define __BUILTIN_AVR_BITSR 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffffL
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __DEC32_MIN__ 1E-95DF
#define __ACCUM_MAX__ 0X7FFFFFFFP-15K
#define __DBL_MAX_EXP__ 128
#define __USACCUM_EPSILON__ 0x1P-8UHK
#define __DEC128_EPSILON__ 1E-33DL
#define __SFRACT_MAX__ 0X7FP-7HR
#define __FRACT_IBIT__ 0
#define __PTRDIFF_MAX__ 0x7fff
#define __UACCUM_MIN__ 0.0UK
#define __AVR_ENHANCED__ 1
#define __UACCUM_IBIT__ 16
#define __BUILTIN_AVR_WDR 1
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 2
#define __ULACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULK
#define __SIZEOF_WINT_T__ 2
#define __SA_IBIT__ 16
#define __ULLACCUM_MIN__ 0.0ULLK
#define __BUILTIN_AVR_ROUNDUHK 1
#define __BUILTIN_AVR_ROUNDUHR 1
#define __GXX_ABI_VERSION 1009
#define __INT24_MAX__ 8388607L
#define __UTA_FBIT__ 48
#define __FLT_MIN_EXP__ (-125)
#define __USFRACT_MAX__ 0XFFP-8UHR
#define __UFRACT_IBIT__ 0
#define __BUILTIN_AVR_ROUNDFX 1
#define __BUILTIN_AVR_ROUNDULK 1
#define __BUILTIN_AVR_ROUNDULR 1
#define __BUILTIN_AVR_COUNTLSLLK 1
#define __BUILTIN_AVR_COUNTLSLLR 1
#define __BUILTIN_AVR_ROUNDHK 1
#define __INT_FAST64_TYPE__ long long int
#define __BUILTIN_AVR_ROUNDHR 1
#define __DBL_MIN__ ((double)1.17549435e-38L)
#define __BUILTIN_AVR_COUNTLSK 1
#define __BUILTIN_AVR_ROUNDLK 1
#define __BUILTIN_AVR_COUNTLSR 1
#define __BUILTIN_AVR_ROUNDLR 1
#define __LACCUM_MIN__ (-0X1P31LK-0X1P31LK)
#define __ULLACCUM_FBIT__ 48
#define __BUILTIN_AVR_LKBITS 1
#define __ULLFRACT_EPSILON__ 0x1P-64ULLR
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffffU
#define __DBL_HAS_DENORM__ 1
#define __BUILTIN_AVR_ULKBITS 1
#define __ACCUM_MIN__ (-0X1P15K-0X1P15K)
#define __AVR_ARCH__ 5
#define __SQ_IBIT__ 0
#define __UINT8_TYPE__ unsigned char
#define __BUILTIN_AVR_ROUNDUK 1
#define __BUILTIN_AVR_ROUNDUR 1
#define __UHA_FBIT__ 8
#define __NO_INLINE__ 1
#define __SFRACT_MIN__ (-0.5HR-0.5HR)
#define __UTQ_FBIT__ 128
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "5.3.0"
#define __UINT64_C(c) c ## ULL
#define __ULLFRACT_FBIT__ 64
#define __FRACT_EPSILON__ 0x1P-15R
#define __ULACCUM_MIN__ 0.0ULK
#define __UDA_FBIT__ 32
#define __MEMX 1
#define __LLACCUM_EPSILON__ 0x1P-47LLK
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define __BUILTIN_AVR_BITSUHK 1
#define __BUILTIN_AVR_BITSUHR 1
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __USFRACT_MIN__ 0.0UHR
#define __BUILTIN_AVR_BITSULK 1
#define __BUILTIN_AVR_BITSULR 1
#define __UQQ_IBIT__ 0
#define __BUILTIN_AVR_LLRBITS 1
#define __BUILTIN_AVR_BITSULLK 1
#define __BUILTIN_AVR_BITSULLR 1
#define __INT32_C(c) c ## L
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __UHQ_FBIT__ 16
#define __LLACCUM_FBIT__ 47
#define __BUILTIN_AVR_ROUNDULLK 1
#define __BUILTIN_AVR_ROUNDULLR 1
#define __INT_FAST32_TYPE__ long int
#define __BUILTIN_AVR_HRBITS 1
#define __UINT_LEAST16_TYPE__ unsigned int
#define __BUILTIN_AVR_UHRBITS 1
#define __INT16_MAX__ 0x7fff
#define __SIZE_TYPE__ unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __UDQ_FBIT__ 64
#define __INT8_TYPE__ signed char
#define __ELF__ 1
#define __ULFRACT_EPSILON__ 0x1P-32ULR
#define __LLFRACT_FBIT__ 63
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ int
#define __BUILTIN_AVR_ABSFX 1
#define __LDBL_EPSILON__ 1.19209290e-7L
#define __UINTMAX_C(c) c ## ULL
#define __INT24_MIN__ (-__INT24_MAX__-1)
#define __SACCUM_MAX__ 0X7FFFP-7HK
#define __BUILTIN_AVR_ABSHK 1
#define __BUILTIN_AVR_ABSHR 1
#define __SIG_ATOMIC_MAX__ 0x7f
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __SIZEOF_PTRDIFF_T__ 2
#define __AVR 1
#define __BUILTIN_AVR_ABSLK 1
#define __BUILTIN_AVR_ABSLR 1
#define __LACCUM_EPSILON__ 0x1P-31LK
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __INT_FAST16_MAX__ 0x7fff
#define __UINT_FAST32_MAX__ 0xffffffffUL
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __USACCUM_MAX__ 0XFFFFP-8UHK
#define __SFRACT_EPSILON__ 0x1P-7HR
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffL
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __USA_FBIT__ 16
#define __UINT_FAST16_TYPE__ unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __BUILTIN_AVR_RBITS 1
#define __CHAR16_TYPE__ unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __AVR_HAVE_LPMX__ 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __UINT_LEAST32_MAX__ 0xffffffffUL
#define __SACCUM_FBIT__ 7
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ int
#define __INT_LEAST8_TYPE__ signed char
#define __STDC_VERSION__ 201112L
#define __SQ_FBIT__ 31
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __INTPTR_MAX__ 0x7fff
#define __QQ_FBIT__ 7
#define __UTA_IBIT__ 16
#define __LDBL_MANT_DIG__ 24
#define __SFRACT_FBIT__ 7
#define __SACCUM_MIN__ (-0X1P7HK-0X1P7HK)
#define __DBL_HAS_QUIET_NAN__ 1
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define AVR 1
#define __BUILTIN_AVR_FMULS 1
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ unsigned int
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define __AVR__ 1
#define __AVR_HAVE_JMP_CALL__ 1
#define __USQ_FBIT__ 32
#define __UINTPTR_MAX__ 0xffffU
#define __DEC64_MIN_EXP__ (-382)
#define __ULLACCUM_IBIT__ 16
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __BUILTIN_AVR_BITSHK 1
#define __BUILTIN_AVR_BITSHR 1
#define __INT_MAX__ 0x7fff
#define __LACCUM_FBIT__ 31
#define __USACCUM_MIN__ 0.0UHK
#define __UHA_IBIT__ 8
#define __INT64_TYPE__ long long int
#define __BUILTIN_AVR_BITSLK 1
#define __BUILTIN_AVR_BITSLR 1
#define __FLT_MAX_EXP__ 128
#define __AVR_HAVE_MUL__ 1
#define __UTQ_IBIT__ 0
#define __DBL_MANT_DIG__ 24
#define __BUILTIN_AVR_ULLKBITS 1
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __AVR_HAVE_MOVW__ 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __UINT_LEAST32_TYPE__ long unsigned int
#define __SIZEOF_SHORT__ 2
#define __ULLFRACT_IBIT__ 0
#define __LDBL_MIN_EXP__ (-125)
#define __UDA_IBIT__ 32
#define __INT_LEAST8_MAX__ 0x7f
#define __LFRACT_FBIT__ 31
#define __LDBL_MAX_10_EXP__ 38
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ ((double)1.19209290e-7L)
#define __BUILTIN_AVR_BITSUK 1
#define __BUILTIN_AVR_BITSUR 1
#define __UINT8_C(c) c
#define __INT_LEAST32_TYPE__ long int
#define __BUILTIN_AVR_URBITS 1
#define __SIZEOF_WCHAR_T__ 2
#define __UINT64_TYPE__ long long unsigned int
#define __LLFRACT_MAX__ 0X7FFFFFFFFFFFFFFFP-63LLR
#define __TQ_FBIT__ 127
#define __INT_FAST8_TYPE__ signed char
#define __ULLACCUM_EPSILON__ 0x1P-48ULLK
#define __BUILTIN_AVR_ROUNDK 1
#define __BUILTIN_AVR_ROUNDR 1
#define __UHQ_IBIT__ 0
#define __LLACCUM_IBIT__ 16
#define __AVR_DEVICE_NAME__ atmega328
#define __DBL_DECIMAL_DIG__ 9
#define __STDC_UTF_32__ 1
#define __DEC_EVAL_METHOD__ 2
#define __TA_FBIT__ 47
#define __UDQ_IBIT__ 0
#define __ORDER_BIG_ENDIAN__ 4321
#define __WITH_AVRLIBC__ 1
#define __ACCUM_EPSILON__ 0x1P-15K
#define __UINT32_C(c) c ## UL
#define __BUILTIN_AVR_COUNTLSUHK 1
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __BUILTIN_AVR_COUNTLSUHR 1
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __LLFRACT_IBIT__ 0
#define __INT8_MAX__ 0x7f
#define __UINT_FAST32_TYPE__ long unsigned int
#define __CHAR32_TYPE__ long unsigned int
#define __BUILTIN_AVR_COUNTLSULK 1
#define __BUILTIN_AVR_COUNTLSULR 1
#define __FLT_MAX__ 3.40282347e+38F
#define __USACCUM_FBIT__ 8
#define __BUILTIN_AVR_COUNTLSFX 1
#define __INT32_TYPE__ long int
#define __SIZEOF_DOUBLE__ 4
#define __FLT_MIN_10_EXP__ (-37)
#define __UFRACT_EPSILON__ 0x1P-16UR
#define __BUILTIN_AVR_COUNTLSHK 1
#define __BUILTIN_AVR_COUNTLSHR 1
#define __INTMAX_TYPE__ long long int
#define __BUILTIN_AVR_ABSLLK 1
#define __BUILTIN_AVR_ABSLLR 1
#define __DEC128_MAX_EXP__ 6145
#define __AVR_HAVE_16BIT_SP__ 1
#define __AVR_ATmega328__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 3
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __DEC32_MANT_DIG__ 7
#define __HA_FBIT__ 7
#define __BUILTIN_AVR_COUNTLSLK 1
#define __BUILTIN_AVR_COUNTLSLR 1
#define __BUILTIN_AVR_CLI 1
#define __DBL_MAX_10_EXP__ 38
#define __LDBL_DENORM_MIN__ 1.40129846e-45L
#define __INT16_C(c) c
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __LLFRACT_MIN__ (-0.5LLR-0.5LLR)
#define __BUILTIN_AVR_LRBITS 1
#define __ATOMIC_SEQ_CST 5
#define __DA_FBIT__ 31
#define __UINT32_TYPE__ long unsigned int
#define __BUILTIN_AVR_ROUNDLLK 1
#define __UINTPTR_TYPE__ unsigned int
#define __BUILTIN_AVR_ROUNDLLR 1
#define __USA_IBIT__ 16
#define __BUILTIN_AVR_ULRBITS 1
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-37)
#define __BUILTIN_AVR_COUNTLSUK 1
#define __BUILTIN_AVR_COUNTLSUR 1
#define __SIZEOF_LONG_LONG__ 8
#define __ULACCUM_EPSILON__ 0x1P-32ULK
#define __SACCUM_IBIT__ 8
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __LDBL_DIG__ 6
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffffU
#define __BUILTIN_AVR_INSERT_BITS 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
#define __BUILTIN_AVR_FLASH_SEGMENT 1
#define __ULLFRACT_MAX__ 0XFFFFFFFFFFFFFFFFP-64ULLR
#define __UINT_FAST8_TYPE__ unsigned char
#define __USFRACT_EPSILON__ 0x1P-8UHR
#define __ULACCUM_FBIT__ 32
#define __QQ_IBIT__ 0
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
#define __BUILTIN_AVR_FMUL 1

D:\>

In this I invoked avr-gcc to build for ATmega328 with no other options and it's clear that just __AVR_XMEGA__ and __AVR_ARCH__ are just a small part of a very big problem. None of the above appear in any scannable .h file in your AVR project so how is the code browser to know the setting of any of these to know which bits of the .h files that are used to parse?

 

In days gone by I used to use Source Insight and it does have a facility to pre-define the "hidden" defines. Not entirely sure how you achieve the same in things like Intellisense, VassistX, etc. etc.

 

But if you can find a way to do it then maybe use the "-E -dM" trick I just showed (with your other relevant command line switches) to get a list like the above then somehow "pipe" this into your source browser.

 

By the way this does not immediately work:

D:\>avr-gcc -mmcu=avr128da28 -E -dM - < nul | grep ARCH
avr-gcc: error: cannot access device-specs for 'avr128da28' expected at 'c:/one/sysgcc/avr/bin/../lib/gcc/avr/5.3.0/device-specs/specs-avr128da28'
avr-gcc: note: supported core architectures: avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny avr1
avr-gcc: note: you can provide your own specs files, see <http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html> for details

D:\>

so it's going to involve some kind of -B invocation to tell it where the device specs for DA's are located.

 

EDIT: something like this:

C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\AVR-Dx_DFP\1.5.74\gcc\dev\avr128da28>avr-gcc -mmcu=avr128da28 -B . -E -dM - < nul | grep ARCH
#define __AVR_ARCH__ 104

C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\AVR-Dx_DFP\1.5.74\gcc\dev\avr128da28>

(though probably the "other way around" with -B giving some long path to that "device-specs" directory location).

Last Edited: Tue. Dec 8, 2020 - 09:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On Linux, I needed to use "/dev/null." That worked for the 328. I will try with all the options, since I don't know if they can change the list.

 

avr-gcc -Wl,-Map,Eeprom.map  -Wl,--gc-sections  -Wl,-u,vfprintf -lprintf_flt -lm -mmcu=avr128da28 -B ../lib/AVR-Dx_DFP/gcc/dev/avr128da28/ -I ../lib/AVR-Dx_DFP/include/ -E -dM - < /dev/null #define __DBL_MIN_EXP__ (-125)
#define __HQ_FBIT__ 15
#define __UINT_LEAST16_MAX__ 0xffffU
#define __ATOMIC_ACQUIRE 2
#define __SFRACT_IBIT__ 0
#define __FLT_MIN__ 1.17549435e-38F
#define __GCC_IEC_559_COMPLEX 0
#define __BUILTIN_AVR_SLEEP 1
#define __BUILTIN_AVR_COUNTLSULLK 1
#define __BUILTIN_AVR_COUNTLSULLR 1
#define __UFRACT_MAX__ 0XFFFFP-16UR
#define __UINT_LEAST8_TYPE__ unsigned char
#define __DQ_FBIT__ 63
#define __INTMAX_C(c) c ## LL
#define __ULFRACT_FBIT__ 32
#define __SACCUM_EPSILON__ 0x1P-7HK
#define __CHAR_BIT__ 8
#define __USQ_IBIT__ 0
#define __UINT8_MAX__ 0xff
#define __ACCUM_FBIT__ 15
#define __WINT_MAX__ 0x7fff
#define __USFRACT_FBIT__ 8
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffU
#define __WCHAR_MAX__ 0x7fff
#define __LACCUM_IBIT__ 32
#define __DBL_DENORM_MIN__ ((double)1.40129846e-45L)
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __GCC_IEC_559 0
#define __FLT_EVAL_METHOD__ 0
#define __BUILTIN_AVR_LLKBITS 1
#define __LLACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-47LLK
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __BUILTIN_AVR_HKBITS 1
#define __BUILTIN_AVR_BITSLLK 1
#define __FRACT_FBIT__ 15
#define __BUILTIN_AVR_BITSLLR 1
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __SIG_ATOMIC_TYPE__ char
#define __BUILTIN_AVR_UHKBITS 1
#define __UACCUM_FBIT__ 16
#define __DBL_MIN_10_EXP__ (-37)
#define __FINITE_MATH_ONLY__ 0
#define __FLASH 1
#define __LFRACT_IBIT__ 0
#define __GNUC_PATCHLEVEL__ 0
#define __AVR_MEGA__ 1
#define __LFRACT_MAX__ 0X7FFFFFFFP-31LR
#define __UINT_FAST8_MAX__ 0xff
#define __has_include(STR) __has_include__(STR)
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __SA_FBIT__ 15
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 3.40282347e+38L
#define __FRACT_MAX__ 0X7FFFP-15R
#define __UFRACT_FBIT__ 16
#define __AVR_XMEGA__ 1
#define __UFRACT_MIN__ 0.0UR
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define __UINTMAX_TYPE__ long long unsigned int
#define __LLFRACT_EPSILON__ 0x1P-63LLR
#define __BUILTIN_AVR_DELAY_CYCLES 1
#define __DEC32_EPSILON__ 1E-6DF
#define __UINT32_MAX__ 0xffffffffUL
#define __ULFRACT_MAX__ 0XFFFFFFFFP-32ULR
#define __TA_IBIT__ 16
#define __LDBL_MAX_EXP__ 128
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define __ULLFRACT_MIN__ 0.0ULLR
#define __SCHAR_MAX__ 0x7f
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## LL
#define __DBL_DIG__ 6
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define __AVR_HAVE_SPH__ 1
#define __LLACCUM_MIN__ (-0X1P15LLK-0X1P15LLK)
#define __BUILTIN_AVR_KBITS 1
#define __BUILTIN_AVR_ABSK 1
#define __BUILTIN_AVR_ABSR 1
#define __SIZEOF_INT__ 2
#define __SIZEOF_POINTER__ 2
#define __USACCUM_IBIT__ 8
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LFRACT_MIN__ (-0.5LR-0.5LR)
#define __HA_IBIT__ 8
#define __TQ_IBIT__ 0
#define __FLT_EPSILON__ 1.19209290e-7F
#define __USFRACT_IBIT__ 0
#define __LDBL_MIN__ 1.17549435e-38L
#define __STDC_UTF_16__ 1
#define __FRACT_MIN__ (-0.5R-0.5R)
#define __AVR_SFR_OFFSET__ 0x0
#define __DEC32_MAX__ 9.999999E96DF
#define __DA_IBIT__ 32
#define __INT32_MAX__ 0x7fffffffL
#define __UQQ_FBIT__ 8
#define __SIZEOF_LONG__ 4
#define __UACCUM_MAX__ 0XFFFFFFFFP-16UK
#define __UINT16_C(c) c ## U
#define __DECIMAL_DIG__ 9
#define __LFRACT_EPSILON__ 0x1P-31LR
#define __AVR_2_BYTE_PC__ 1
#define __ULFRACT_MIN__ 0.0ULR
#define __has_include_next(STR) __has_include_next__(STR)
#define __BUILTIN_AVR_ULLRBITS 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __ULACCUM_IBIT__ 32
#define __UACCUM_EPSILON__ 0x1P-16UK
#define __BUILTIN_AVR_SEI 1
#define __GNUC__ 5
#define __ULLACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-48ULLK
#define __HQ_IBIT__ 0
#define __BUILTIN_AVR_SWAP 1
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 4
#define __BIGGEST_ALIGNMENT__ 1
#define __UINT24_MAX__ 16777215UL
#define __BUILTIN_AVR_NOP 1
#define __GNUC_STDC_INLINE__ 1
#define __DQ_IBIT__ 0
#define __DBL_MAX__ ((double)3.40282347e+38L)
#define __ULFRACT_IBIT__ 0
#define __INT_FAST32_MAX__ 0x7fffffffL
#define __DBL_HAS_INFINITY__ 1
#define __ACCUM_IBIT__ 16
#define __DEC32_MIN_EXP__ (-94)
#define __BUILTIN_AVR_UKBITS 1
#define __BUILTIN_AVR_FMULSU 1
#define __LACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-31LK
#define __INT_FAST16_TYPE__ int
#define __AVR_HAVE_ELPM__ 1
#define __LDBL_HAS_DENORM__ 1
#define __BUILTIN_AVR_BITSK 1
#define __BUILTIN_AVR_BITSR 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffffL
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __DEC32_MIN__ 1E-95DF
#define __ACCUM_MAX__ 0X7FFFFFFFP-15K
#define __DBL_MAX_EXP__ 128
#define __USACCUM_EPSILON__ 0x1P-8UHK
#define __DEC128_EPSILON__ 1E-33DL
#define __SFRACT_MAX__ 0X7FP-7HR
#define __FRACT_IBIT__ 0
#define __PTRDIFF_MAX__ 0x7fff
#define __UACCUM_MIN__ 0.0UK
#define __AVR_ENHANCED__ 1
#define __UACCUM_IBIT__ 16
#define __BUILTIN_AVR_WDR 1
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 2
#define __ULACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULK
#define __SIZEOF_WINT_T__ 2
#define __SA_IBIT__ 16
#define __ULLACCUM_MIN__ 0.0ULLK
#define __BUILTIN_AVR_ROUNDUHK 1
#define __BUILTIN_AVR_ROUNDUHR 1
#define __GXX_ABI_VERSION 1009
#define __INT24_MAX__ 8388607L
#define __UTA_FBIT__ 48
#define __FLT_MIN_EXP__ (-125)
#define __USFRACT_MAX__ 0XFFP-8UHR
#define __UFRACT_IBIT__ 0
#define __BUILTIN_AVR_ROUNDFX 1
#define __BUILTIN_AVR_ROUNDULK 1
#define __BUILTIN_AVR_ROUNDULR 1
#define __BUILTIN_AVR_COUNTLSLLK 1
#define __BUILTIN_AVR_COUNTLSLLR 1
#define __BUILTIN_AVR_ROUNDHK 1
#define __INT_FAST64_TYPE__ long long int
#define __BUILTIN_AVR_ROUNDHR 1
#define __DBL_MIN__ ((double)1.17549435e-38L)
#define __BUILTIN_AVR_COUNTLSK 1
#define __BUILTIN_AVR_ROUNDLK 1
#define __BUILTIN_AVR_COUNTLSR 1
#define __BUILTIN_AVR_ROUNDLR 1
#define __AVR_DEV_LIB_NAME__ avr128da28
#define __LACCUM_MIN__ (-0X1P31LK-0X1P31LK)
#define __ULLACCUM_FBIT__ 48
#define __BUILTIN_AVR_LKBITS 1
#define __ULLFRACT_EPSILON__ 0x1P-64ULLR
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffffU
#define __DBL_HAS_DENORM__ 1
#define __BUILTIN_AVR_ULKBITS 1
#define __ACCUM_MIN__ (-0X1P15K-0X1P15K)
#define __AVR_ARCH__ 104
#define __SQ_IBIT__ 0
#define __UINT8_TYPE__ unsigned char
#define __BUILTIN_AVR_ROUNDUK 1
#define __BUILTIN_AVR_ROUNDUR 1
#define __UHA_FBIT__ 8
#define __FLASH1 1
#define __NO_INLINE__ 1
#define __SFRACT_MIN__ (-0.5HR-0.5HR)
#define __UTQ_FBIT__ 128
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "5.4.0"
#define __UINT64_C(c) c ## ULL
#define __ULLFRACT_FBIT__ 64
#define __AVR_HAVE_ELPMX__ 1
#define __FRACT_EPSILON__ 0x1P-15R
#define __ULACCUM_MIN__ 0.0ULK
#define __UDA_FBIT__ 32
#define __MEMX 1
#define __LLACCUM_EPSILON__ 0x1P-47LLK
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define __BUILTIN_AVR_BITSUHK 1
#define __BUILTIN_AVR_BITSUHR 1
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __USFRACT_MIN__ 0.0UHR
#define __BUILTIN_AVR_BITSULK 1
#define __BUILTIN_AVR_BITSULR 1
#define __UQQ_IBIT__ 0
#define __BUILTIN_AVR_LLRBITS 1
#define __BUILTIN_AVR_BITSULLK 1
#define __BUILTIN_AVR_BITSULLR 1
#define __INT32_C(c) c ## L
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __UHQ_FBIT__ 16
#define __LLACCUM_FBIT__ 47
#define __BUILTIN_AVR_ROUNDULLK 1
#define __BUILTIN_AVR_ROUNDULLR 1
#define __INT_FAST32_TYPE__ long int
#define __BUILTIN_AVR_HRBITS 1
#define __UINT_LEAST16_TYPE__ unsigned int
#define __BUILTIN_AVR_UHRBITS 1
#define __INT16_MAX__ 0x7fff
#define __SIZE_TYPE__ unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __UDQ_FBIT__ 64
#define __INT8_TYPE__ signed char
#define __ELF__ 1
#define __ULFRACT_EPSILON__ 0x1P-32ULR
#define __LLFRACT_FBIT__ 63
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ int
#define __BUILTIN_AVR_ABSFX 1
#define __LDBL_EPSILON__ 1.19209290e-7L
#define __UINTMAX_C(c) c ## ULL
#define __INT24_MIN__ (-__INT24_MAX__-1)
#define __SACCUM_MAX__ 0X7FFFP-7HK
#define __BUILTIN_AVR_ABSHK 1
#define __BUILTIN_AVR_ABSHR 1
#define __SIG_ATOMIC_MAX__ 0x7f
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __SIZEOF_PTRDIFF_T__ 2
#define __AVR 1
#define __BUILTIN_AVR_ABSLK 1
#define __BUILTIN_AVR_ABSLR 1
#define __LACCUM_EPSILON__ 0x1P-31LK
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __AVR_HAVE_RAMPZ__ 1
#define __INT_FAST16_MAX__ 0x7fff
#define __UINT_FAST32_MAX__ 0xffffffffUL
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __USACCUM_MAX__ 0XFFFFP-8UHK
#define __SFRACT_EPSILON__ 0x1P-7HR
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffL
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __USA_FBIT__ 16
#define __UINT_FAST16_TYPE__ unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __BUILTIN_AVR_RBITS 1
#define __CHAR16_TYPE__ unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __AVR_HAVE_LPMX__ 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __UINT_LEAST32_MAX__ 0xffffffffUL
#define __SACCUM_FBIT__ 7
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ int
#define __INT_LEAST8_TYPE__ signed char
#define __STDC_VERSION__ 201112L
#define __SQ_FBIT__ 31
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __INTPTR_MAX__ 0x7fff
#define __QQ_FBIT__ 7
#define __UTA_IBIT__ 16
#define __LDBL_MANT_DIG__ 24
#define __SFRACT_FBIT__ 7
#define __SACCUM_MIN__ (-0X1P7HK-0X1P7HK)
#define __DBL_HAS_QUIET_NAN__ 1
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define AVR 1
#define __BUILTIN_AVR_FMULS 1
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ unsigned int
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define __AVR__ 1
#define __AVR_HAVE_JMP_CALL__ 1
#define __USQ_FBIT__ 32
#define __UINTPTR_MAX__ 0xffffU
#define __DEC64_MIN_EXP__ (-382)
#define __ULLACCUM_IBIT__ 16
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __BUILTIN_AVR_BITSHK 1
#define __BUILTIN_AVR_BITSHR 1
#define __INT_MAX__ 0x7fff
#define __LACCUM_FBIT__ 31
#define __USACCUM_MIN__ 0.0UHK
#define __UHA_IBIT__ 8
#define __INT64_TYPE__ long long int
#define __BUILTIN_AVR_BITSLK 1
#define __BUILTIN_AVR_BITSLR 1
#define __FLT_MAX_EXP__ 128
#define __AVR_HAVE_MUL__ 1
#define __UTQ_IBIT__ 0
#define __DBL_MANT_DIG__ 24
#define __BUILTIN_AVR_ULLKBITS 1
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __AVR_HAVE_MOVW__ 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ int
#define __UINT_LEAST32_TYPE__ long unsigned int
#define __SIZEOF_SHORT__ 2
#define __ULLFRACT_IBIT__ 0
#define __LDBL_MIN_EXP__ (-125)
#define __UDA_IBIT__ 32
#define __INT_LEAST8_MAX__ 0x7f
#define __LFRACT_FBIT__ 31
#define __LDBL_MAX_10_EXP__ 38
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ ((double)1.19209290e-7L)
#define __BUILTIN_AVR_BITSUK 1
#define __BUILTIN_AVR_BITSUR 1
#define __UINT8_C(c) c
#define __INT_LEAST32_TYPE__ long int
#define __BUILTIN_AVR_URBITS 1
#define __SIZEOF_WCHAR_T__ 2
#define __UINT64_TYPE__ long long unsigned int
#define __AVR_AVR128DA28__ 1
#define __LLFRACT_MAX__ 0X7FFFFFFFFFFFFFFFP-63LLR
#define __TQ_FBIT__ 127
#define __INT_FAST8_TYPE__ signed char
#define __ULLACCUM_EPSILON__ 0x1P-48ULLK
#define __BUILTIN_AVR_ROUNDK 1
#define __BUILTIN_AVR_ROUNDR 1
#define __UHQ_IBIT__ 0
#define __LLACCUM_IBIT__ 16
#define __AVR_DEVICE_NAME__ avr128da28
#define __DBL_DECIMAL_DIG__ 9
#define __STDC_UTF_32__ 1
#define __DEC_EVAL_METHOD__ 2
#define __TA_FBIT__ 47
#define __UDQ_IBIT__ 0
#define __ORDER_BIG_ENDIAN__ 4321
#define __WITH_AVRLIBC__ 1
#define __ACCUM_EPSILON__ 0x1P-15K
#define __UINT32_C(c) c ## UL
#define __BUILTIN_AVR_COUNTLSUHK 1
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __BUILTIN_AVR_COUNTLSUHR 1
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __LLFRACT_IBIT__ 0
#define __INT8_MAX__ 0x7f
#define __UINT_FAST32_TYPE__ long unsigned int
#define __CHAR32_TYPE__ long unsigned int
#define __BUILTIN_AVR_COUNTLSULK 1
#define __BUILTIN_AVR_COUNTLSULR 1
#define __FLT_MAX__ 3.40282347e+38F
#define __USACCUM_FBIT__ 8
#define __BUILTIN_AVR_COUNTLSFX 1
#define __INT32_TYPE__ long int
#define __SIZEOF_DOUBLE__ 4
#define __FLT_MIN_10_EXP__ (-37)
#define __UFRACT_EPSILON__ 0x1P-16UR
#define __BUILTIN_AVR_COUNTLSHK 1
#define __BUILTIN_AVR_COUNTLSHR 1
#define __INTMAX_TYPE__ long long int
#define __BUILTIN_AVR_ABSLLK 1
#define __BUILTIN_AVR_ABSLLR 1
#define __DEC128_MAX_EXP__ 6145
#define __AVR_HAVE_16BIT_SP__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 4
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __DEC32_MANT_DIG__ 7
#define __HA_FBIT__ 7
#define __BUILTIN_AVR_COUNTLSLK 1
#define __BUILTIN_AVR_COUNTLSLR 1
#define __BUILTIN_AVR_CLI 1
#define __DBL_MAX_10_EXP__ 38
#define __LDBL_DENORM_MIN__ 1.40129846e-45L
#define __INT16_C(c) c
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __LLFRACT_MIN__ (-0.5LLR-0.5LLR)
#define __BUILTIN_AVR_LRBITS 1
#define __ATOMIC_SEQ_CST 5
#define __DA_FBIT__ 31
#define __UINT32_TYPE__ long unsigned int
#define __BUILTIN_AVR_ROUNDLLK 1
#define __UINTPTR_TYPE__ unsigned int
#define __BUILTIN_AVR_ROUNDLLR 1
#define __USA_IBIT__ 16
#define __BUILTIN_AVR_ULRBITS 1
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-37)
#define __BUILTIN_AVR_COUNTLSUK 1
#define __BUILTIN_AVR_COUNTLSUR 1
#define __SIZEOF_LONG_LONG__ 8
#define __ULACCUM_EPSILON__ 0x1P-32ULK
#define __SACCUM_IBIT__ 8
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __LDBL_DIG__ 6
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffffU
#define __BUILTIN_AVR_INSERT_BITS 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
#define __BUILTIN_AVR_FLASH_SEGMENT 1
#define __ULLFRACT_MAX__ 0XFFFFFFFFFFFFFFFFP-64ULLR
#define __UINT_FAST8_TYPE__ unsigned char
#define __USFRACT_EPSILON__ 0x1P-8UHR
#define __ULACCUM_FBIT__ 32
#define __QQ_IBIT__ 0
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
#define __BUILTIN_AVR_FMUL 1

Ok, I should make some notes befor going to watch the Starship hop.

 

update: added a make rule, seems like the best place for it.

 

https://github.com/epccs/MacGyver/blob/master/Applications/Adc/Makefile

 

update2: abort

Last Edited: Tue. Dec 8, 2020 - 10:43 PM