Commit 9c012400 authored by lcgamboa's avatar lcgamboa

new: support to atmega2560

parent 761728d7
......@@ -17,7 +17,7 @@ execdir= ${prefix}/bin/
override CFLAGS += -DEXT_BROWSER -D_VERSION_=\"${VERSION}\" -Wall -ggdb -D_SHARE_=\"${sharedir}\" -I/usr/include/lxrad_X11 -Wall -D_REENTRANT
#override CFLAGS+= -D_NOTHREAD
override CFLAGS+=-fsanitize=address
#override CFLAGS+=-fsanitize=address
override CFLAGS+= -D_EXPERIMENTAL_
#LIBS = `lxrad_X11-config --libs` -lpicsim -lsimavr -lelf -lminizip
......
......@@ -348,7 +348,7 @@ cboard_0::Draw(CDraw *draw, double scale)
break;
case O_MP:
lxFont font ((MGetPinCount () > 14)? 12 :10, lxFONTFAMILY_TELETYPE, lxFONTSTYLE_NORMAL, lxFONTWEIGHT_NORMAL);
lxFont font ((MGetPinCount () > 14) ? 12 : 10, lxFONTFAMILY_TELETYPE, lxFONTSTYLE_NORMAL, lxFONTWEIGHT_NORMAL);
draw->Canvas.SetFont (font);
......@@ -378,7 +378,7 @@ cboard_0::Run_CPU(void)
int j;
unsigned char pi;
const picpin * pins;
unsigned int alm[40];
unsigned int alm[100];
int JUMPSTEPS = 0;
//long int NSTEPJ = 0;
......@@ -593,8 +593,6 @@ cboard_0::MInit(const char * processor, const char * fname, float freq)
break;
}
if (!ret)
{
lxImage image;
switch (MGetPinCount ())
......@@ -617,6 +615,9 @@ cboard_0::MInit(const char * processor, const char * fname, float freq)
case 40:
image.LoadFile (Window1.GetSharePath () + lxT ("boards/ic40.png"));
break;
case 100:
image.LoadFile (Window1.GetSharePath () + lxT ("boards/ic100.png"));
break;
default:
image.LoadFile (Window1.GetSharePath () + lxT ("boards/ic40.png"));
printf ("IC package with %i pins not found!\n", MGetPinCount ());
......@@ -625,7 +626,7 @@ cboard_0::MInit(const char * processor, const char * fname, float freq)
if (micbmp) delete micbmp;
micbmp = new lxBitmap (image, &Window1);
}
return ret;
}
......
......@@ -86,7 +86,7 @@ class cboard_0:public board_pic, public board_avr
void Run_CPU(void);
//Return a list of board supported microcontrollers
#ifdef _EXPERIMENTAL_
String GetSupportedDevices(void){return lxT("atmega328p,PIC16F18324,PIC16F18855,PIC16F1619,PIC16F1788,PIC16F1789,PIC16F1939,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4520,PIC18F4550,PIC18F45K50,PIC18F4620,PIC18F27K40,PIC18F47K40,");};
String GetSupportedDevices(void){return lxT("atmega328p,atmega2560,PIC16F18324,PIC16F18855,PIC16F1619,PIC16F1788,PIC16F1789,PIC16F1939,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4520,PIC18F4550,PIC18F45K50,PIC18F4620,PIC18F27K40,PIC18F47K40,");};
#else
String GetSupportedDevices(void){return lxT("atmega328p,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4550,PIC18F4620,");};
#endif
......
This diff is collapsed.
......@@ -96,8 +96,7 @@ class board_avr: virtual public board
avr_t * avr;
avr_irq_t * serial_irq;
picpin pins[256];
//FIXME only for atmega328 suppport
avr_irq_t * Write_stat_irq[28];
avr_irq_t * Write_stat_irq[100];
unsigned int serialbaud;
float serialexbaud;
void pins_reset(void);
......
......@@ -30,7 +30,7 @@
#include"parts/part.h"
#include"parts/parts_defs.h"
#define IOINIT 70
#define IOINIT 110
/**
* @brief CPWindow4 class
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment