BleuLlama / TinyBasicPlus

A C implementation of Tiny Basic, with a focus on support for Arduino
401 stars 117 forks source link

"Size of array 'program' is negative" and many more errors #16

Closed Merlin04 closed 6 years ago

Merlin04 commented 8 years ago

I get this error when I compile TinyBasicPlus.ino:

Arduino: 1.6.5 (Windows 8.1), Board: "Adafruit Trinket 16MHz"

Build options changed, rebuilding all

TinyBasicPlus:270: error: size of array 'program' is negative
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,
                 from TinyBasicPlus.ino:81:
TinyBasicPlus:278: error: variable 'keywords' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus:370: error: variable 'func_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus:385: error: variable 'to_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus:390: error: variable 'step_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus:395: error: variable 'relop_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus:415: error: variable 'highlow_tab' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TinyBasicPlus.ino: In function 'void setup()':
TinyBasicPlus:1923: error: 'Serial' was not declared in this scope
TinyBasicPlus.ino: In function 'unsigned char breakcheck()':
TinyBasicPlus:1966: error: 'Serial' was not declared in this scope
TinyBasicPlus.ino: In function 'int inchar()':
TinyBasicPlus:2015: error: 'Serial' was not declared in this scope
TinyBasicPlus.ino: In function 'void outchar(unsigned char)':
TinyBasicPlus:2062: error: 'Serial' was not declared in this scope
size of array 'program' is negative

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
BleuLlama commented 6 years ago

You may need to do additional footwork to get it working for the Trinket. The values defined to determine the ram and peripherals are designed specifically for a few of the more common arduino models, not the Trinket.

On Tue, Dec 29, 2015 at 1:42 PM, Merlin04 notifications@github.com wrote:

I get this error when I compile TinyBasicPlusino:

Arduino: 165 (Windows 81), Board: "Adafruit Trinket 16MHz"

Build options changed, rebuilding all

TinyBasicPlus:270: error: size of array 'program' is negative In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduinoh:28:0, from TinyBasicPlusino:81: TinyBasicPlus:278: error: variable 'keywords' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlus:370: error: variable 'func_tab' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlus:385: error: variable 'to_tab' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlus:390: error: variable 'step_tab' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlus:395: error: variable 'relop_tab' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlus:415: error: variable 'highlow_tab' must be const in order to be put into read-only section by means of 'attribute((progmem))' TinyBasicPlusino: In function 'void setup()': TinyBasicPlus:1923: error: 'Serial' was not declared in this scope TinyBasicPlusino: In function 'unsigned char breakcheck()': TinyBasicPlus:1966: error: 'Serial' was not declared in this scope TinyBasicPlusino: In function 'int inchar()': TinyBasicPlus:2015: error: 'Serial' was not declared in this scope TinyBasicPlusino: In function 'void outchar(unsigned char)': TinyBasicPlus:2062: error: 'Serial' was not declared in this scope size of array 'program' is negative

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences

— Reply to this email directly or view it on GitHub https://github.com/BleuLlama/TinyBasicPlus/issues/16.

-- Scott Lawrence yorgle@gmail.com