Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DemonSeed EDU #278

Open
wants to merge 3 commits into
base: testing
Choose a base branch
from
Open

DemonSeed EDU #278

wants to merge 3 commits into from

Conversation

steka
Copy link

@steka steka commented Feb 25, 2024

This pull request:

  • Add a new configuration for the DemonSeed EDU, since it controls the pull-up on the D- line to present it self as a Low-Speed USB device.

  • Fix warnings when using input() and pinsOff() marcos. Since the build reported:
    warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]

  • Fix so that t841_default builds. The build reported:
    ld.exe: address 0x200e of main.bin section '.text' is not within region 'text'

@steka steka changed the title Testing DemonSeed Feb 25, 2024
@steka steka changed the title DemonSeed DemonSeed EDU Feb 25, 2024
@ArminJo
Copy link
Contributor

ArminJo commented Feb 26, 2024

The O.MG DemonSeed EDU is an educational hardware implant to make good USB cables bad.

My buildlog shows:

Building Micronucleus configuration: t841_default 
8K  Device -- Codesize: 1514 bytes, BOOTLOADER_ADDRESS: 0x1A00, Free user memory 6650 bytes.
16K Device -- Codesize: 1514 bytes, BOOTLOADER_ADDRESS: 0x3A00, Free user memory 14842 bytes.

Show more context for:
warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]
I cannot reproduce it.

@steka
Copy link
Author

steka commented Feb 26, 2024

This is how it looks when I build your testing branch

Stefan@Lenovium MINGW64 ~/Documents/BlxGithub/DemonSeed/micronucleus/firmware
$ git log -1
commit 0e4feaa00041c91208b3cc231313dcb884e825e9 (HEAD, tag: testing-LATEST, origin/testing)
Author: Tim <cpldcpu@gmail.com>
Date:   Mon Jul 12 19:01:21 2021 +0200

    t4313 support

Stefan@Lenovium MINGW64 ~/Documents/BlxGithub/DemonSeed/micronucleus/firmware
$ make release
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: Nanite841
   text    data     bss     dec     hex filename
      0    1570       0    1570     622 main.hex
8K  Device -- Codesize: 1570 bytes, BOOTLOADER_ADDRESS: 0x19C0, Free user memory 6586 bytes.
16K Device -- Codesize: 1570 bytes, BOOTLOADER_ADDRESS: 0x3980, Free user memory 14714 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: m168p_extclock
   text    data     bss     dec     hex filename
      0    1404       0    1404     57c main.hex
8K  Device -- Codesize: 1404 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1404 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*36 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: m328p_extclock
   text    data     bss     dec     hex filename
      0    1404       0    1404     57c main.hex
8K  Device -- Codesize: 1404 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1404 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*36 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t167_default
   text    data     bss     dec     hex filename
      0    1360       0    1360     550 main.hex
8K  Device -- Codesize: 1360 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1360 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*36 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t4313_default
   text    data     bss     dec     hex filename
      0    1364       0    1364     554 main.hex
8K  Device -- Codesize: 1364 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1364 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t45_default
   text    data     bss     dec     hex filename
      0    1532       0    1532     5fc main.hex
8K  Device -- Codesize: 1532 bytes, BOOTLOADER_ADDRESS: 0x1A00, Free user memory 6650 bytes.
16K Device -- Codesize: 1532 bytes, BOOTLOADER_ADDRESS: 0x3A00, Free user memory 14842 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
c:/msys64/mingw64/bin/../lib/gcc/avr/12.2.0/../../../../avr/bin/ld.exe: address 0x200e of main.bin section `.text' is not within region `text'
c:/msys64/mingw64/bin/../lib/gcc/avr/12.2.0/../../../../avr/bin/ld.exe: address 0x200e of main.bin section `.text' is not within region `text'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:97: main.bin] Error 1
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
mv: cannot stat 'main.hex': No such file or directory
mv: cannot stat 'upgrade.hex': No such file or directory
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t84_default
   text    data     bss     dec     hex filename
      0    1502       0    1502     5de main.hex
8K  Device -- Codesize: 1502 bytes, BOOTLOADER_ADDRESS: 0x1A00, Free user memory 6650 bytes.
16K Device -- Codesize: 1502 bytes, BOOTLOADER_ADDRESS: 0x3A00, Free user memory 14842 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t85_aggressive
   text    data     bss     dec     hex filename
      0    1380       0    1380     564 main.hex
8K  Device -- Codesize: 1380 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1380 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t85_default
   text    data     bss     dec     hex filename
      0    1532       0    1532     5fc main.hex
8K  Device -- Codesize: 1532 bytes, BOOTLOADER_ADDRESS: 0x1A00, Free user memory 6650 bytes.
16K Device -- Codesize: 1532 bytes, BOOTLOADER_ADDRESS: 0x3A00, Free user memory 14842 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*56 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*55 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
Building Micronucleus configuration: t88_default
   text    data     bss     dec     hex filename
      0    1372       0    1372     55c main.hex
8K  Device -- Codesize: 1372 bytes, BOOTLOADER_ADDRESS: 0x1A80, Free user memory 6778 bytes.
16K Device -- Codesize: 1372 bytes, BOOTLOADER_ADDRESS: 0x3A80, Free user memory 14970 bytes.
In file included from upgrade.c:21:
upgrade.c: In function 'main':
utils.h:40:34: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*37 & -256' to '0' [-Woverflow]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                                  ^
upgrade.c:44:3: note: in expansion of macro 'pinsOff'
   44 |   pinsOff(0xFF); // pull down all pins
      |   ^~~~~~~
utils.h:35:32: warning: overflow in conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '(int)*36 & -256' to '0' [-Woverflow]
   35 | #define inputs(pinmap) DDRB &= ~(pinmap)
      |                                ^
upgrade.c:47:3: note: in expansion of macro 'inputs'
   47 |   inputs(0xFF); // let them float
      |   ^~~~~~
upgrade.c: In function 'beep':
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:195:3: note: in expansion of macro 'pinOff'
  195 |   pinOff( 1 );
      |   ^~~~~~
utils.h:40:31: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds]
   40 | #define pinsOff(pinmap) PORTB &= ~(pinmap)
      |                               ^~
utils.h:45:21: note: in expansion of macro 'pinsOff'
   45 | #define pinOff(pin) pinsOff(bit(pin))
      |                     ^~~~~~~
upgrade.c:202:5: note: in expansion of macro 'pinOff'
  202 |     pinOff( 1 );
      |     ^~~~~~
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Entering directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'
make[1]: Leaving directory '/c/Users/Stefan/Documents/BlxGithub/DemonSeed/micronucleus/firmware'

Stefan@Lenovium MINGW64 ~/Documents/BlxGithub/DemonSeed/micronucleus/firmware
$ avr-gcc --version
avr-gcc.exe (GCC) 12.2.0
Copyright (C) 2022 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.


Stefan@Lenovium MINGW64 ~/Documents/BlxGithub/DemonSeed/micronucleus/firmware
$

It could be related to that we might be using different versions of the compiler (I listed me version on the output above).
As you can see in the output it refering to the -Woverflow warning flag, but I tried to disable it with -Wno-overflow but that didn't seem to help!?!

Your build log seems to point to another repo !?!
So I also tried to build that one, but it has even more warnings, most like due to that the -Wall -Wextra options are enabled in the Makefile.

BTW, I'm building it on a Windows 10 computer using MSYS2/MINGW64 with the latest avr-toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants