AVR again (AVR-GSM + AVR-JTAG-USB-A)

In the knowledge of that I won’t be working in the way like ordinary people do for a while, it occurred to me that I should pull this old funny project out of the drawer for a bit.

Annak a tudatában, hogy most egy ideig nem fogok a hétköznapi emberek által megszokott módon dolgozni, eszembe jutott, hogy elő kellene venni a fiók mélyéről ezt a régi projektet egy picit.

My old MacBook Pro said this:

08:08:01 Thu Jun 16 [flex@flexs-MacBook-Pro-13:[~/Downloads] [0]
$ sw_vers

ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G9323

08:08:03 Thu Jun 16 [flex@flexs-MacBook-Pro-13:[~/Downloads] [0]
$ avr-gcc --version

avr-gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

08:08:06 Thu Jun 16 [flex@flexs-MacBook-Pro-13:[~/Downloads] [0]
$ avr-objcopy --version

GNU objcopy (GNU Binutils) 2.19
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

08:08:41 Thu Jun 16 [flex@flexs-MacBook-Pro-13:[~/Downloads] [0]
$ avrdude -v

avrdude: Version 5.6, compiled on Apr 15 2009 at 17:54:59
		 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

		 System wide configuration file is "/usr/local/CrossPack-AVR-20090415/etc/avrdude.conf"
		 User configuration file is "/Users/flex/.avrduderc"
		 User configuration file does not exist or is not a regular file, skipping


avrdude: no programmer has been specified on the command line or the config file
		 Specify a programmer using the -c option and try again

20:41:22 Wed Jun 15 [flex@flexs-MacBook-Pro-13:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ cd ~flex/development/AVR/newAVR-GSM-SMS2/

20:41:29 Wed Jun 15 [flex@flexs-MacBook-Pro-13:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ make

-------- begin --------
expr: syntax error
sh: line 0: [: -eq: unary operator expected
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
avr-gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Size before:
AVR-GSM-SMS.elf  :
section            size      addr
.text             14844         0
.data               968   8388704
.bss                580   8389672
.debug_aranges      300         0
.debug_pubnames    1895         0
.debug_info       14511         0
.debug_abbrev      4567         0
.debug_line       13163         0
.debug_str         2804         0
.debug_ranges        48         0
Total             53680


Compiling: AVR-GSM-SMS.c
avr-gcc -c -mmcu=atmega32 -I. -g -DF_CPU=7372800UL    -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AVR-GSM-SMS.lst  -std=gnu99 -MD -MP -MF .dep/AVR-GSM-SMS.o.d AVR-GSM-SMS.c -o AVR-GSM-SMS.o
AVR-GSM-SMS.c: In function `main':
AVR-GSM-SMS.c:1336: warning: implicit declaration of function `uart_wait_for_empty_buffer'
AVR-GSM-SMS.c: In function `waiting_for_carrier_and_put_temporary_buffer':
AVR-GSM-SMS.c:572: warning: control reaches end of non-void function

Linking: AVR-GSM-SMS.elf
avr-gcc -mmcu=atmega32 -I. -g -DF_CPU=7372800UL    -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AVR-GSM-SMS.o  -std=gnu99 -MD -MP -MF .dep/AVR-GSM-SMS.elf.d AVR-GSM-SMS.o lcd.o uart.o twimaster.o AVR-GSM.o --output AVR-GSM-SMS.elf -Wl,-Map=AVR-GSM-SMS.map,--cref    -lm

Creating load file for Flash: AVR-GSM-SMS.hex
avr-objcopy -O ihex -R .eeprom AVR-GSM-SMS.elf AVR-GSM-SMS.hex

Creating load file for EEPROM: AVR-GSM-SMS.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex AVR-GSM-SMS.elf AVR-GSM-SMS.eep
avr-objcopy: --change-section-lma .eeprom=0x00000000 never used

Creating Extended Listing: AVR-GSM-SMS.lss
avr-objdump -h -S AVR-GSM-SMS.elf > AVR-GSM-SMS.lss

Creating Symbol Table: AVR-GSM-SMS.sym
avr-nm -n AVR-GSM-SMS.elf > AVR-GSM-SMS.sym

Size after:
AVR-GSM-SMS.elf  :
section            size      addr
.text             14844         0
.data               968   8388704
.bss                580   8389672
.debug_aranges      300         0
.debug_pubnames    1895         0
.debug_info       14511         0
.debug_abbrev      4567         0
.debug_line       13163         0
.debug_str         2804         0
.debug_ranges        48         0
Total             53680

-------- end --------

20:41:33 Wed Jun 15 [flex@flexs-MacBook-Pro-13:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ make program

avrdude -p atmega32 -P /dev/cu.usbserial-A3000SLY     -c jtag1 -b 57600    -U flash:w:AVR-GSM-SMS.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e9502
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
		 To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "AVR-GSM-SMS.hex"
avrdude: input file AVR-GSM-SMS.hex auto detected as Intel Hex
avrdude: writing flash (15812 bytes):

Writing | ################################################## | 100% 7.93s

avrdude: 15812 bytes of flash written
avrdude: verifying flash memory against AVR-GSM-SMS.hex:
avrdude: load data flash data from input file AVR-GSM-SMS.hex:
avrdude: input file AVR-GSM-SMS.hex auto detected as Intel Hex
avrdude: input file AVR-GSM-SMS.hex contains 15812 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.54s

avrdude: verifying ...
avrdude: 15812 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

20:41:54 Wed Jun 15 [flex@flexs-MacBook-Pro-13:[~/development/AVR/newAVR-GSM-SMS2] [0]

The devices

(https://www.olimex.com/Products/AVR/Development/AVR-GSM/)[https://www.olimex.com/Products/AVR/Development/AVR-GSM/] (https://www.olimex.com/Products/AVR/Programmers/AVR-JTAG-USB-A/)[https://www.olimex.com/Products/AVR/Programmers/AVR-JTAG-USB-A/]

And the new one

$ cd ~flex/development/AVR/newAVR-GSM-SMS2/

21:34:02 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ make

-------- begin --------
expr: syntax error
sh: line 0: [: -eq: unary operator expected
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
/usr/local/CrossPack-AVR/bin/avr-gcc: line 3: /usr/local/CrossPack-AVR-20090415/avr-3/bin/gcc: Bad CPU type in executable
/usr/local/CrossPack-AVR/bin/avr-gcc: line 3: /usr/local/CrossPack-AVR-20090415/avr-3/bin/gcc: Undefined error: 0
make: *** [gccversion] Error 1

21:34:03 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [2]
$ sudo /usr/local/CrossPack-AVR/uninstall

Password:
Are you sure you want to uninstall CrossPack for AVR Development 20090415?
[y/N]
y
Starting uninstall.
CrossPack for AVR Development is now removed.

21:35:02 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [1]
$ sudo /usr/local/CrossPack-AVR-20130212/uninstall

Are you sure you want to uninstall CrossPack for AVR Development 20130212?
[y/N]
y
Starting uninstall.
CrossPack for AVR Development is now removed.

21:35:21 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ make

-------- begin --------
expr: syntax error
sh: line 0: [: -eq: unary operator expected
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
sh: avr-gcc: command not found
make: *** [gccversion] Error 127

21:35:43 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [2]
$ brew link osx-cross/avr/avr-gcc@11

Warning: avr-gcc@11 is keg-only and must be linked with `--force`.

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/avr-gcc@11/bin:$PATH"' >> ~/.profile

21:36:20 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ brew link --force osx-cross/avr/avr-gcc@11

Linking /usr/local/Cellar/avr-gcc@11/11.3.0... 22 symlinks created.

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/avr-gcc@11/bin:$PATH"' >> ~/.profile

21:36:39 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ make

-------- begin --------
expr: syntax error
sh: line 0: [: -eq: unary operator expected
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
avr-gcc (Homebrew AVR GCC 11.3.0) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Size before:
AVR-GSM-SMS.elf  :
section                     size      addr
.text                      14544         0
.data                        936   8388704
.bss                         420   8389640
.comment                      38         0
.note.gnu.avr.deviceinfo      60         0
.debug_aranges               328         0
.debug_info                22744         0
.debug_abbrev               4476         0
.debug_line                21451         0
.debug_frame                1752         0
.debug_str                  2741         0
.debug_line_str              566         0
.debug_loclists             6565         0
.debug_rnglists              120         0
Total                      76741


Compiling: AVR-GSM-SMS.c
avr-gcc -c -mmcu=atmega32 -I. -g -DF_CPU=7372800UL    -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AVR-GSM-SMS.lst  -std=gnu99 -MD -MP -MF .dep/AVR-GSM-SMS.o.d AVR-GSM-SMS.c -o AVR-GSM-SMS.o
In file included from AVR-GSM-SMS.c:46:
AVR-GSM-SMS.c: In function 'main':
AVR-GSM-SMS.c:980:81: warning: pointer targets in passing argument 2 of 'lcd_morph_p' differ in signedness [-Wpointer-sign]
  980 |       if ( In_OPT2() ) lcd_morph_P( "Home Automation by   _flex from FleXoft.", rand_matrix1 );
	  |                                                                                 ^~~~~~~~~~~~
	  |                                                                                 |
	  |                                                                                 const unsigned char *
AVR-GSM.h:60:59: note: in definition of macro 'lcd_morph_P'
   60 | #define lcd_morph_P( __p, __r ) lcd_morph_p( PSTR( __p ), __r )
	  |                                                           ^~~
AVR-GSM.h:59:53: note: expected 'const char *' but argument is of type 'const unsigned char *'
   59 | extern void lcd_morph_p( const char *p, const char *r );
	  |                                         ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1033:52: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1033 |           if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix2 );
	  |                                                    ^~~~~~~~~~~~
	  |                                                    |
	  |                                                    const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1059:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1059 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix5 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1090:54: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1090 |             if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix1 );
	  |                                                      ^~~~~~~~~~~~
	  |                                                      |
	  |                                                      const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1106:49: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1106 |       if ( In_OPT2() ) lcd_morph( generalPage , rand_matrix2 );
	  |                                                 ^~~~~~~~~~~~
	  |                                                 |
	  |                                                 const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1115:81: warning: pointer targets in passing argument 2 of 'lcd_morph_p' differ in signedness [-Wpointer-sign]
 1115 |       if ( In_OPT2() ) lcd_morph_P( " www.fleischmann.hu gyorgy@fleishmann.hu", rand_matrix3 );
	  |                                                                                 ^~~~~~~~~~~~
	  |                                                                                 |
	  |                                                                                 const unsigned char *
AVR-GSM.h:60:59: note: in definition of macro 'lcd_morph_P'
   60 | #define lcd_morph_P( __p, __r ) lcd_morph_p( PSTR( __p ), __r )
	  |                                                           ^~~
AVR-GSM.h:59:53: note: expected 'const char *' but argument is of type 'const unsigned char *'
   59 | extern void lcd_morph_p( const char *p, const char *r );
	  |                                         ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1137:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1137 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix4 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1150:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1150 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix4 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1165:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1165 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix4 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1186:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1186 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix1 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1208:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1208 |       if ( In_OPT2() ) lcd_morph( generalPage, rand_matrix1 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1221:48: warning: pointer targets in passing argument 2 of 'lcd_morph' differ in signedness [-Wpointer-sign]
 1221 |       if ( In_OPT2() ) lcd_morph( smsSentPage, rand_matrix5 );
	  |                                                ^~~~~~~~~~~~
	  |                                                |
	  |                                                const unsigned char *
In file included from AVR-GSM-SMS.c:46:
AVR-GSM.h:57:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
   57 | extern void lcd_morph( char *p, const char *r );
	  |                                 ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1230:81: warning: pointer targets in passing argument 2 of 'lcd_morph_p' differ in signedness [-Wpointer-sign]
 1230 |       if ( In_OPT2() ) lcd_morph_P( "1www.fleischmann.hu gyorgy@fleishmann.hu", rand_matrix3 );
	  |                                                                                 ^~~~~~~~~~~~
	  |                                                                                 |
	  |                                                                                 const unsigned char *
AVR-GSM.h:60:59: note: in definition of macro 'lcd_morph_P'
   60 | #define lcd_morph_P( __p, __r ) lcd_morph_p( PSTR( __p ), __r )
	  |                                                           ^~~
AVR-GSM.h:59:53: note: expected 'const char *' but argument is of type 'const unsigned char *'
   59 | extern void lcd_morph_p( const char *p, const char *r );
	  |                                         ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1239:81: warning: pointer targets in passing argument 2 of 'lcd_morph_p' differ in signedness [-Wpointer-sign]
 1239 |       if ( In_OPT2() ) lcd_morph_P( "2www.fleischmann.hu gyorgy@fleishmann.hu", rand_matrix3 );
	  |                                                                                 ^~~~~~~~~~~~
	  |                                                                                 |
	  |                                                                                 const unsigned char *
AVR-GSM.h:60:59: note: in definition of macro 'lcd_morph_P'
   60 | #define lcd_morph_P( __p, __r ) lcd_morph_p( PSTR( __p ), __r )
	  |                                                           ^~~
AVR-GSM.h:59:53: note: expected 'const char *' but argument is of type 'const unsigned char *'
   59 | extern void lcd_morph_p( const char *p, const char *r );
	  |                                         ~~~~~~~~~~~~^
AVR-GSM-SMS.c:1336:9: warning: implicit declaration of function 'uart_wait_for_empty_buffer'; did you mean 'uart_wait_for_emty_buffer'? [-Wimplicit-function-declaration]
 1336 |         uart_wait_for_empty_buffer();
	  |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
	  |         uart_wait_for_emty_buffer
AVR-GSM-SMS.c: In function 'waiting_for_carrier_and_put_temporary_buffer':
AVR-GSM-SMS.c:572:1: warning: control reaches end of non-void function [-Wreturn-type]
  572 | }
	  | ^
At top level:
AVR-GSM-SMS.c:323:27: warning: 'smsSentPage_' defined but not used [-Wunused-const-variable=]
  323 | static const PROGMEM char smsSentPage_[] =         "Status SMS sent to:        ____________.";
	  |                           ^~~~~~~~~~~~
AVR-GSM-SMS.c: In function 'send_sms_status':
AVR-GSM-SMS.c:524:44: warning: 'sprintf' writing a terminating nul past the end of the destination [-Wformat-overflow=]
  524 |   sprintf( teszt, "1:%2d 2:%2d 3:%2d 4: %2d", aa, i, bb, cc);
	  |                                            ^
AVR-GSM-SMS.c:524:3: note: 'sprintf' output between 21 and 37 bytes into a destination of size 20
  524 |   sprintf( teszt, "1:%2d 2:%2d 3:%2d 4: %2d", aa, i, bb, cc);
	  |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Linking: AVR-GSM-SMS.elf
avr-gcc -mmcu=atmega32 -I. -g -DF_CPU=7372800UL    -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AVR-GSM-SMS.o  -std=gnu99 -MD -MP -MF .dep/AVR-GSM-SMS.elf.d AVR-GSM-SMS.o lcd.o uart.o twimaster.o AVR-GSM.o --output AVR-GSM-SMS.elf -Wl,-Map=AVR-GSM-SMS.map,--cref    -lm

Creating load file for Flash: AVR-GSM-SMS.hex
avr-objcopy -O ihex -R .eeprom AVR-GSM-SMS.elf AVR-GSM-SMS.hex

Creating load file for EEPROM: AVR-GSM-SMS.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
	--change-section-lma .eeprom=0 -O ihex AVR-GSM-SMS.elf AVR-GSM-SMS.eep
avr-objcopy: --change-section-lma .eeprom=0x0000000000000000 never used

Creating Extended Listing: AVR-GSM-SMS.lss
avr-objdump -h -S AVR-GSM-SMS.elf > AVR-GSM-SMS.lss

Creating Symbol Table: AVR-GSM-SMS.sym
avr-nm -n AVR-GSM-SMS.elf > AVR-GSM-SMS.sym

Size after:
AVR-GSM-SMS.elf  :
section                     size      addr
.text                      14544         0
.data                        936   8388704
.bss                         420   8389640
.comment                      38         0
.note.gnu.avr.deviceinfo      60         0
.debug_aranges               328         0
.debug_info                22744         0
.debug_abbrev               4476         0
.debug_line                21451         0
.debug_frame                1752         0
.debug_str                  2741         0
.debug_line_str              566         0
.debug_loclists             6565         0
.debug_rnglists              120         0
Total                      76741

-------- end --------

21:36:44 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]

Command collection

brew tap osx-cross/avr
brew install avr-libc
brew install osx-cross/avr/avr-gcc@11
brew install avrdude
brew install avr-binutils

Debugging

23:21:24 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]
$ brew install osx-cross/avr/avr-gdb

Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 2 taps (osx-cross/avr and homebrew/core).

==> Downloading https://github.com/osx-cross/homebrew-avr/releases/download/avr-gdb-10.1/avr-gdb-10.1.catalina.bottle.1.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/30939945/5c8cdbfa-813d-465c-a8b8-e7d8f25673a5?X-Amz-Algorith
######################################################################## 100.0%
==> Installing avr-gdb from osx-cross/avr
==> Pouring avr-gdb-10.1.catalina.bottle.1.tar.gz
==> Caveats
gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:

  https://sourceware.org/gdb/wiki/BuildingOnDarwin

On 10.12 (Sierra) or later with SIP, you need to run this:

  echo "set startup-with-shell off" >> ~/.gdbinit
==> Summary
🍺  /usr/local/Cellar/avr-gdb/10.1: 57 files, 10MB
==> Running `brew cleanup avr-gdb`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

23:23:01 Wed Jun 15 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]

$ avr-gdb

GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin19.6.0 --target=avr".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
	<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) quit

13:03:00 Fri Jun 17 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [1]

$ brew install osx-cross/avr/avarice

==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/automake/blobs/sha256:ae77a247a13ea860236a29b02769f5327395f712413f694d8a8d20cb6c21332d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ae77a247a13ea860236a29b02769f5327395f712413f694d8a8d20cb6c21332d?se=2022-
######################################################################## 100.0%
==> Downloading https://github.com/osx-cross/homebrew-avr/releases/download/avarice-2.13_1/avarice-2.13_1.catalina.bottle.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/30939945/793d8375-d751-4668-b339-d7225d1a8027?X-Amz-Algorith
######################################################################## 100.0%
==> Installing avarice from osx-cross/avr
==> Installing dependencies for osx-cross/avr/avarice: automake
==> Installing osx-cross/avr/avarice dependency: automake
==> Pouring automake--1.16.5.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/automake/1.16.5: 131 files, 3.5MB
==> Installing osx-cross/avr/avarice
==> Pouring avarice-2.13_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/avarice/2.13_1: 15 files, 403.6KB
==> Running `brew cleanup avarice`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

And flashing

12:33:20 Tue Jun 21 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [2]
$ make program

avrdude -p atmega32 -P /dev/cu.usbserial-A3000SLY     -c jtag1 -b 57600    -U flash:w:AVR-GSM-SMS.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9502 (probably m32)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
		 To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "AVR-GSM-SMS.hex"
avrdude: input file AVR-GSM-SMS.hex auto detected as Intel Hex
avrdude: writing flash (15480 bytes):

Writing | ################################################## | 100% 7.74s

avrdude: 15480 bytes of flash written
avrdude: verifying flash memory against AVR-GSM-SMS.hex:
avrdude: input file AVR-GSM-SMS.hex auto detected as Intel Hex

Reading | ################################################## | 100% 5.08s

avrdude: 15480 bytes of flash verified

avrdude done.  Thank you.

12:34:04 Tue Jun 21 [flex@flexs-MacBook-Pro-16:[~/development/AVR/newAVR-GSM-SMS2] [0]

🤞