technoblogy / ulisp

A version of the Lisp programming language for ATmega-based Arduino boards.

Home Page:http://www.ulisp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nano "Board Not Supported"

eclab opened this issue · comments

The AVR-Nano distro is touted as running on, well, you now, the (328P) Nano. But if you compile it for the Nano, it comes up as "Board Not Supported". And indeed, it's not listed among the boards below.

#if defined(ARDUINO_AVR_UNO)
#define WORKSPACESIZE (320-SDSIZE) /* Objects (4*bytes) /
#define EEPROMSIZE 1024 /
Bytes */
#define STACKDIFF 1
#define CPU_ATmega328P

#elif defined(ARDUINO_AVR_MEGA2560)
#define WORKSPACESIZE (1344-SDSIZE) /* Objects (4*bytes) /
#define EEPROMSIZE 4096 /
Bytes */
#define STACKDIFF 320
#define CPU_ATmega2560

#elif defined(AVR_ATmega1284P)
#include "optiboot.h"
#define WORKSPACESIZE (2944-SDSIZE) /* Objects (4*bytes) /
// #define EEPROMSIZE 4096 /
Bytes /
#define FLASHWRITESIZE 16384 /
Bytes /
#define CODESIZE 96 /
Bytes <= 256 */
#define STACKDIFF 320
#define CPU_ATmega1284P

#elif defined(ARDUINO_AVR_NANO_EVERY)
#define WORKSPACESIZE (1060-SDSIZE) /* Objects (4*bytes) /
#define EEPROMSIZE 256 /
Bytes */
#define STACKDIFF 160
#define CPU_ATmega4809

#elif defined(ARDUINO_AVR_ATmega4809) /* Curiosity Nano using MegaCoreX /
#define Serial Serial3
#define WORKSPACESIZE (1065-SDSIZE) /
Objects (4*bytes) /
#define EEPROMSIZE 256 /
Bytes */
#define STACKDIFF 320
#define CPU_ATmega4809

#elif defined(ARDUINO_AVR_ATtiny3227)
#define WORKSPACESIZE (514-SDSIZE) /* Objects (4*bytes) /
// #define EEPROMSIZE 256 /
Bytes */
#define STACKDIFF 1
#define CPU_ATtiny3227

#elif defined(AVR_AVR128DA48)
#include <Flash.h>
#define Serial Serial1
#define WORKSPACESIZE (2920-SDSIZE) /* Objects (4*bytes) /
#define FLASHWRITESIZE 16384 /
Bytes /
#define CODESIZE 96 /
Bytes <= 512 */
#define STACKDIFF 320
#define CPU_AVR128DX48
#define LED_BUILTIN 20

#elif defined(AVR_AVR128DB48)
#include <Flash.h>
#define Serial Serial3
#define WORKSPACESIZE (2920-SDSIZE) /* Objects (4*bytes) /
#define FLASHWRITESIZE 16384 /
Bytes /
#define CODESIZE 96 /
Bytes <= 512 */
#define STACKDIFF 320
#define CPU_AVR128DX48
#define LED_BUILTIN 20

#else
#error "Board not supported!"
#endif

Ah, I think you don't have it listed because you're assuming the board is changed to Uno after the bootloader is changed. It might be good to have an error generated to that effect...

Yes, as explained here: Arduino Uno and Nano.

I agree I could handle that better than "Board not supported". I'll add an error as you suggest - thanks!