Jump to content

Several problems with arduino tinybasic computer.

Toyota AE86

Hi.

While trying to build one of these https://www.instructables.com/Single-Chip-AVR-BASIC-Computer/ I have ran into several problems.

First of all when trying to compile I get these error messeges.

 

Arduino:1.8.13 (Windows 10), Płytka:"ATmega1284, Yes (UART0), Standard pinout, EEPROM retained, 1284, BOD 2.7V, LTO disabled, Internal 8 MHz"
In file included from C:\Users\Wiktor\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.8\cores\MCUdude_corefiles/Arduino.h:28:0,

                 from sketch\AVR_BASIC_Computer_V0.1.ino.cpp:1:

AVR_BASIC_Computer_V0.1:307:33: error: variable 'keywords' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char keywords[] PROGMEM = {

                                 ^

AVR_BASIC_Computer_V0.1:399:33: error: variable 'func_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char func_tab[] PROGMEM = {

                                 ^

AVR_BASIC_Computer_V0.1:414:31: error: variable 'to_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char to_tab[] PROGMEM = {

                               ^

AVR_BASIC_Computer_V0.1:419:33: error: variable 'step_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char step_tab[] PROGMEM = {

                                 ^

AVR_BASIC_Computer_V0.1:424:34: error: variable 'relop_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char relop_tab[] PROGMEM = {

                                  ^

AVR_BASIC_Computer_V0.1:444:36: error: variable 'highlow_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static unsigned char highlow_tab[] PROGMEM = {

                                    ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void loop()':

AVR_BASIC_Computer_V0.1:1309:13: error: 'disk1' was not declared in this scope

       val = disk1.read_byte(i);

             ^~~~~

AVR_BASIC_Computer_V0.1:1330:7: error: 'disk1' was not declared in this scope

       disk1.write( i, 0 );

       ^~~~~

AVR_BASIC_Computer_V0.1:1661:13: error: 'disk1' was not declared in this scope

       val = disk1.read_byte( i );

             ^~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void setup()':

AVR_BASIC_Computer_V0.1:1943:12: error: 'PAL' was not declared in this scope

   TV.begin(PAL, 720, 480);

            ^~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:1943:12: note: suggested alternative: '_PAL'

   TV.begin(PAL, 720, 480);

            ^~~

            _PAL

AVR_BASIC_Computer_V0.1:1944:25: error: invalid conversion from 'const unsigned char*' to 'uint8_t {aka unsigned char}' [-fpermissive]

   TV.select_font(font6x8);

                         ^

In file included from C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:92:0:

C:\Users\Wiktor\Documents\Arduino\libraries\TVout/TVout.h:103:7: note:   initializing argument 1 of 'void TVout::select_font(uint8_t)'

  void select_font(uint8_t f);

       ^~~~~~~~~~~

AVR_BASIC_Computer_V0.1:1945:6: error: 'class TVout' has no member named 'set_hbi_hook'

   TV.set_hbi_hook(keyboard.begin());

      ^~~~~~~~~~~~

AVR_BASIC_Computer_V0.1:1950:6: error: 'class TVout' has no member named 'println'; did you mean 'print_str'?

   TV.println( sentinel );

      ^~~~~~~

      print_str

AVR_BASIC_Computer_V0.1:1954:3: error: 'disk1' was not declared in this scope

   disk1.setup();

   ^~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'int inchar()':

AVR_BASIC_Computer_V0.1:2035:9: error: 'disk1' was not declared in this scope

     v = disk1.read_byte(eepos++);

         ^~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void outchar(unsigned char)':

AVR_BASIC_Computer_V0.1:2094:7: error: 'disk1' was not declared in this scope

       disk1.write(eepos++, c);

       ^~~~~

AVR_BASIC_Computer_V0.1:2099:8: error: 'class TVout' has no member named 'print'

     TV.print((char)c);

        ^~~~~

exit status 1

variable 'keywords' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


Ten raport powinien zawierać więcej informacji jeśli w
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"

Also when i tried ot change those unasigned chars to const i get these error messeges.

Arduino:1.8.13 (Windows 10), Płytka:"ATmega1284, Yes (UART0), Standard pinout, EEPROM retained, 1284, BOD 2.7V, LTO disabled, Internal 8 MHz"





















C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'short int expr4()':

AVR_BASIC_Computer_V0.1:805:23: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

     scantable(func_tab);

                       ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'short int expression()':

AVR_BASIC_Computer_V0.1:934:22: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

   scantable(relop_tab);

                      ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void loop()':

AVR_BASIC_Computer_V0.1:1166:21: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

   scantable(keywords);

                     ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

AVR_BASIC_Computer_V0.1:1309:13: error: 'disk1' was not declared in this scope

       val = disk1.read_byte(i);

             ^~~~~

AVR_BASIC_Computer_V0.1:1330:7: error: 'disk1' was not declared in this scope

       disk1.write( i, 0 );

       ^~~~~

AVR_BASIC_Computer_V0.1:1404:21: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

     scantable(to_tab);

                     ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

AVR_BASIC_Computer_V0.1:1412:23: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

     scantable(step_tab);

                       ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

AVR_BASIC_Computer_V0.1:1661:13: error: 'disk1' was not declared in this scope

       val = disk1.read_byte( i );

             ^~~~~

AVR_BASIC_Computer_V0.1:1697:26: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

     scantable(highlow_tab);

                          ^

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:505:13: note:   initializing argument 1 of 'void scantable(unsigned char*)'

 static void scantable(unsigned char *table)

             ^~~~~~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void setup()':

AVR_BASIC_Computer_V0.1:1943:12: error: 'PAL' was not declared in this scope

   TV.begin(PAL, 720, 480);

            ^~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:1943:12: note: suggested alternative: '_PAL'

   TV.begin(PAL, 720, 480);

            ^~~

            _PAL

AVR_BASIC_Computer_V0.1:1944:25: error: invalid conversion from 'const unsigned char*' to 'uint8_t {aka unsigned char}' [-fpermissive]

   TV.select_font(font6x8);

                         ^

In file included from C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino:92:0:

C:\Users\Wiktor\Documents\Arduino\libraries\TVout/TVout.h:103:7: note:   initializing argument 1 of 'void TVout::select_font(uint8_t)'

  void select_font(uint8_t f);

       ^~~~~~~~~~~

AVR_BASIC_Computer_V0.1:1945:6: error: 'class TVout' has no member named 'set_hbi_hook'

   TV.set_hbi_hook(keyboard.begin());

      ^~~~~~~~~~~~

AVR_BASIC_Computer_V0.1:1950:6: error: 'class TVout' has no member named 'println'; did you mean 'print_str'?

   TV.println( sentinel );

      ^~~~~~~

      print_str

AVR_BASIC_Computer_V0.1:1954:3: error: 'disk1' was not declared in this scope

   disk1.setup();

   ^~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'int inchar()':

AVR_BASIC_Computer_V0.1:2035:9: error: 'disk1' was not declared in this scope

     v = disk1.read_byte(eepos++);

         ^~~~~

C:\Users\Wiktor\Downloads\AVR BASIC Computer V0.1 Firmware\AVR BASIC Computer V0.1 Firmware\AVR_BASIC_Computer_V0.1\AVR_BASIC_Computer_V0.1.ino: In function 'void outchar(unsigned char)':

AVR_BASIC_Computer_V0.1:2094:7: error: 'disk1' was not declared in this scope

       disk1.write(eepos++, c);

       ^~~~~

AVR_BASIC_Computer_V0.1:2099:8: error: 'class TVout' has no member named 'print'

     TV.print((char)c);

        ^~~~~

exit status 1

invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]



Ten raport powinien zawierać więcej informacji jeśli w 
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"

Any idea how to fix those?
Thank You for all answers

 

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×