Commit d39476de authored by lcgamboa's avatar lcgamboa

chg: Makefile changed to compile experimental support !minor

parent 5add666b
......@@ -8,6 +8,8 @@ SUBDIRS= src tools/espmsim tools/srtank
all:$(SUBDIRS)
exp:$(SUBDIRS)
install:$(SUBDIRS)
clean:$(SUBDIRS)
......
......@@ -17,7 +17,6 @@ execdir= ${prefix}/bin/
override CFLAGS+= -D_VERSION_=\"$(VERSION)\" -Wall -O2 -D_SHARE_=\"${sharedir}\" `lxrad-config --cxxflags`
override CFLAGS+= -DEXT_BROWSER
#override CFLAGS+=-fsanitize=address
#override CFLAGS+= -D_EXPERIMENTAL_
LIBS = `lxrad-config --libs` -lpicsim -lsimavr -lelf
LIBS+= ../../ucsim-0.6/libucsim.a
......
include ../VERSION
override CFLAGS+= -DEXT_BROWSER_EXAMPLES -DLEGACY081
OBJS = ppicsimlab.o picsimlab1.o picsimlab2.o picsimlab3.o picsimlab4.o picsimlab5.o\
boards/board.o boards/boards_defs.o boards/board_pic.o boards/board_avr.o boards/board_avr_serial.o\
boards/board_McLab1.o boards/board_K16F.o boards/board_McLab2.o boards/board_PICGenios.o \
boards/board_Arduino_Uno.o boards/board_MPLAB_Xpress.o boards/board_ucsim.o\
boards/board_Curiosity.o boards/board_x.o boards/board_Breadboard.o boards/board_s51.o\
boards/board_Arduino_Uno.o boards/board_Breadboard.o \
devices/lcd_hd44780.o devices/mi2c_24CXXX.o devices/rtc_ds1307.o devices/rtc_pfc8563.o devices/lcd_pcf8833.o\
devices/lcd_pcd8544.o devices/mplabxd.o devices/ldd_max72xx.o devices/io_74xx595.o devices/io_PCF8574.o\
devices/io_MCP23X17.o \
......@@ -16,6 +13,19 @@ OBJS = ppicsimlab.o picsimlab1.o picsimlab2.o picsimlab3.o picsimlab4.o picsimla
parts/part_LED_matrix.o parts/part_7s_Display.o parts/part_TempSys.o parts/part_keypad.o \
parts/part_MI2C_24CXXX.o parts/part_RTC_ds1307.o parts/part_RTC_pfc8563.o parts/part_IO_74xx595.o \
parts/part_VCD_Dump.o parts/part_IO_PCF8574.o parts/part_Buzzer.o parts/part_SignalGenerator.o \
parts/part_push_buttons_an.o parts/part_VCD_Dump_an.o parts/part_IO_MCP23S17.o\
boards/board_Blue_Pill.o boards/board_stm32.o
parts/part_push_buttons_an.o parts/part_VCD_Dump_an.o parts/part_IO_MCP23S17.o
OBJS_EXP = boards/board_MPLAB_Xpress.o boards/board_Curiosity.o boards/board_x.o boards/board_Blue_Pill.o \
boards/board_stm32.o boards/board_ucsim.o boards/board_s51.o
.DEFAULT_GOAL := all
.PHONY: exp
exp: OBJS+=$(OBJS_EXP)
exp: EFLAGS=-D_EXPERIMENTAL_
exp: $(OBJS_EXP) all
override CFLAGS+= $(EFLAGS) -DEXT_BROWSER_EXAMPLES -DLEGACY081
......@@ -29,7 +29,6 @@ override CFLAGS+= -s EXPORTED_FUNCTIONS='["_main","_file_ready","_lxrad_scale_up
#CFLAGS+=-s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=2
#CFLAGS+=--emrun
CFLAGS+= -D_NOTHREAD
#CFLAGS+= -D_EXPERIMENTAL_
LIBS= ../../LXRAD_SDL2/lib/liblxrad_SDL2_js.a ../../picsim/src/libpicsim_js.a ../../simavr/simavr/obj-wasm32-unknown-emscripten/libsimavr.a
LIBS+= ../../LXRAD_SDL2/teste/zlib-master/contrib/minizip/minizip.a
......
......@@ -28,7 +28,6 @@ override CFLAGS+= -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1
#CFLAGS+=--emrun
#CFLAGS+= -D_NOTHREAD
#CFLAGS+= -D_EXPERIMENTAL_
LIBS= ../../LXRAD_SDL2/lib/liblxrad_SDL2_js_mt.a ../../picsim/src/libpicsim_js_mt.a ../../simavr/simavr/obj-wasm32-unknown-emscripten_mt/libsimavr_mt.a
LIBS+= ../../LXRAD_SDL2/teste/zlib-master/contrib/minizip/minizip_mt.a
......
......@@ -18,7 +18,6 @@ override CFLAGS += -DEXT_BROWSER -D_VERSION_=\"${VERSION}\" -Wall -ggdb -D_SHAR
override CFLAGS+=-fsanitize=address
override CFLAGS+= -D_NOTHREAD
#CFLAGS+= -D_EXPERIMENTAL_
LIBS = `lxrad_SDL2-config --libs` -lpicsim -lsimavr -lelf -lminizip
......
......@@ -7,6 +7,7 @@ prefix=/usr
RM= rm -f
CP= cp
MKDIR = mkdir -p
EFLAGS=
appdir= ${prefix}/share/applications/
sharedir= ${prefix}/share/picsimlab/
......@@ -18,7 +19,6 @@ override CFLAGS += -DEXT_BROWSER -D_VERSION_=\"${VERSION}\" -Wall -ggdb -D_SHARE
#override CFLAGS+= -D_NOTHREAD
#override CFLAGS+=-fsanitize=address
override CFLAGS+= -D_EXPERIMENTAL_ -DAVR_USE_GDB
#LIBS = `lxrad_X11-config --libs` -lpicsim -lsimavr -lelf -lminizip
LIBS = `lxrad_X11-config --libs` ../../picsim/src/libpicsim_dbg.a ../../simavr/simavr/obj-x86_64-linux-gnu/libsimavr.a -lelf -lminizip
......
......@@ -7,7 +7,6 @@ override CFLAGS+= -Wall -O3 -D_WIN_ -I../dev_w64/include -I../dev_w64/include/lx
override CFLAGS+= -DEXT_BROWSER
override CFLAGS+=-I../dev_w64/lib/wx/include/x86_64-w64-mingw32-msw-unicode-3.1 -I../dev_w64/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__
#CFLAGS+=`x86_64-w64-mingw32-msw-unicode-3.1 --cxxflags`
#CFLAGS+= -D_EXPERIMENTAL_
LIBS= -llxrad -lOpenAL32 -lpicsim -lsimavr -lws2_32 -L../dev_w64/lib
LIBS+= -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1-x86_64-w64-mingw32 -lwx_mswu_html-3.1-x86_64-w64-mingw32 -lwx_mswu_qa-3.1-x86_64-w64-mingw32 -lwx_mswu_core-3.1-x86_64-w64-mingw32 -lwx_baseu_xml-3.1-x86_64-w64-mingw32 -lwx_baseu_net-3.1-x86_64-w64-mingw32 -lwx_baseu-3.1-x86_64-w64-mingw32
......
......@@ -8,7 +8,6 @@ override CFLAGS+= -DEXT_BROWSER
override CFLAGS+= -I../dev_w32/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I../dev_w32/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -mthreads
#CFLAGS +=`i686-w64-mingw32-msw-unicode-3.1 --cxxflags`
#CFLAGS+= -D_EXPERIMENTAL_
LIBS= -llxrad -lOpenAL32 -lpicsim -lsimavr -lws2_32 -L../dev_w32/lib
LIBS+= -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1-i686-w64-mingw32 -lwx_mswu_html-3.1-i686-w64-mingw32 -lwx_mswu_qa-3.1-i686-w64-mingw32 -lwx_mswu_core-3.1-i686-w64-mingw32 -lwx_baseu_xml-3.1-i686-w64-mingw32 -lwx_baseu_net-3.1-i686-w64-mingw32 -lwx_baseu-3.1-i686-w64-mingw32
......
......@@ -17,7 +17,6 @@ execdir= ${prefix}/bin/
override CFLAGS += -D_VERSION_=\"$(VERSION)\" -Wall -O2 -D_SHARE_=\"${sharedir}\" `lxrad-config --cxxflags`
override CFLAGS+= -DEXT_BROWSER
#override CFLAGS+=-fsanitize=address
#override CFLAGS+= -D_EXPERIMENTAL_
LIBS= ../../picsim/src/libpicsim.a ../../lxrad/lib/liblxrad.a \
../../simavr/simavr/obj-x86_64-linux-gnu/libsimavr.a\
......
......@@ -353,7 +353,7 @@ cboard_Arduino_Uno::WritePreferences(void)
{
//write selected microcontroller of board_x to preferences
Window1.saveprefs (lxT ("Arduino_Uno_proc"), Proc);
Window1.saveprefs (lxT ("Arduino_Uno_clock"), String ().Format ("%2.1f", Window1.GetClock()));
Window1.saveprefs (lxT ("Arduino_Uno_clock"), String ().Format ("%2.1f", Window1.GetClock ()));
}
//Called whe configuration file load preferences
......@@ -366,10 +366,10 @@ cboard_Arduino_Uno::ReadPreferences(char *name, char *value)
{
Proc = value;
}
if (!strcmp (name, "Arduino_Uno_clock"))
if (!strcmp (name, "Arduino_Uno_clock"))
{
Window1.SetClock (atof(value));
Window1.SetClock (atof (value));
}
}
......@@ -493,10 +493,10 @@ cboard_Arduino_Uno::Draw(CDraw *draw, double scale)
draw->Canvas.SetColor (0, 225 * Window1.Get_mcupwr () + 30, 0);
break;
case O_RX:
draw->Canvas.SetColor (0, 255-pins[1].oavalue, 0);
draw->Canvas.SetColor (0, 255 - pins[1].oavalue, 0);
break;
case O_TX:
draw->Canvas.SetColor (0, 255- ((unsigned char) pins[2].oavalue*10), 0);
draw->Canvas.SetColor (0, 255 - ((unsigned char) pins[2].oavalue * 10), 0);
break;
case O_L:
draw->Canvas.SetColor (0, pins[18].oavalue, 0);
......@@ -564,25 +564,24 @@ cboard_Arduino_Uno::Run_CPU(void)
for (i = 0; i < (Window1.GetNSTEP ()*4); i++) //repeat for number of steps in 100ms
{
//verify if a breakpoint is reached if not run one instruction
#ifndef AVR_USE_GDB
if (!mplabxd_testbp ())
#endif
{
if (twostep)
{
twostep = 0; //NOP
}
else
{
cycle_start = avr->cycle;
avr_run (avr);
if ((avr->cycle - cycle_start) > 1)
{
twostep = 1;
}
}
}
//verify if a breakpoint is reached if not run one instruction
if (avr_debug_type || (!mplabxd_testbp ()))
{
if (twostep)
{
twostep = 0; //NOP
}
else
{
cycle_start = avr->cycle;
avr_run (avr);
if ((avr->cycle - cycle_start) > 1)
{
twostep = 1;
}
}
}
UpdateHardware ();
......
......@@ -367,9 +367,6 @@ cboard_Blue_Pill::Run_CPU(void)
}
#ifdef _EXPERIMENTAL_
//Register the board in PICSimLab
board_init("Blue Pill", cboard_Blue_Pill);
#endif
......@@ -211,7 +211,7 @@ cboard_Breadboard::WritePreferences(void)
{
//write selected microcontroller of board_x to preferences
Window1.saveprefs (lxT ("Breadboard_proc"), Proc);
Window1.saveprefs (lxT ("Breadboard_clock"), String ().Format ("%2.1f", Window1.GetClock()));
Window1.saveprefs (lxT ("Breadboard_clock"), String ().Format ("%2.1f", Window1.GetClock ()));
}
//Called whe configuration file load preferences
......@@ -226,7 +226,7 @@ cboard_Breadboard::ReadPreferences(char *name, char *value)
}
if (!strcmp (name, "Breadboard_clock"))
{
Window1.SetClock (atof(value));
Window1.SetClock (atof (value));
}
}
......@@ -354,9 +354,9 @@ cboard_Breadboard::Draw(CDraw *draw, double scale)
case O_MP:
lxFont font (
(MGetPinCount () >= 100 ) ? 9 : ((MGetPinCount () > 14) ? 12 : 10)
, lxFONTFAMILY_TELETYPE, lxFONTSTYLE_NORMAL, lxFONTWEIGHT_NORMAL);
(MGetPinCount () >= 100) ? 9 : ((MGetPinCount () > 14) ? 12 : 10)
, lxFONTFAMILY_TELETYPE, lxFONTSTYLE_NORMAL, lxFONTWEIGHT_NORMAL);
draw->Canvas.SetFont (font);
ps = micbmp->GetSize ();
......@@ -468,9 +468,7 @@ cboard_Breadboard::Run_CPU(void)
{
//verify if a breakpoint is reached if not run one instruction
#ifndef AVR_USE_GDB
if (!mplabxd_testbp ())
#endif
if (avr_debug_type || (!mplabxd_testbp ()))
{
if (twostep)
{
......
......@@ -632,8 +632,5 @@ cboard_Curiosity::Run_CPU(void)
if (use_spare)Window5.PostProcess ();
}
#ifdef _EXPERIMENTAL_
board_init("Curiosity", cboard_Curiosity);
#endif
......@@ -587,8 +587,5 @@ cboard_MPLAB_Xpress::Run_CPU(void)
if (use_spare)Window5.PostProcess ();
}
#ifdef _EXPERIMENTAL_
board_init("MPLAB Xpress", cboard_MPLAB_Xpress);
#endif
......@@ -102,12 +102,12 @@ class board_avr: virtual public board
unsigned int serialbaud;
float serialexbaud;
void pins_reset(void);
int avr_debug_type;
private:
int parse_hex(char *line,int bytes);
unsigned char checksum(char* str);
int read_ihx_avr(const char * fname, int leeprom);
int write_ihx_avr(const char * fname);
int avr_debug_type;
};
......
......@@ -367,9 +367,6 @@ cboard_s51::Run_CPU(void)
}
#ifdef _EXPERIMENTAL_
//Register the board in PICSimLab
board_init("s51", cboard_s51);
#endif
......@@ -560,9 +560,6 @@ cboard_x::Run_CPU(void)
}
#ifdef _EXPERIMENTAL_
//Register the board in PICSimLab
board_init("X", cboard_x);
#endif
......@@ -43,7 +43,7 @@ void board_register(const char * name, board_create_func bcreate);
//boards object creation
board * create_board(int *lab, int *lab_);
#define BOARDS_MAX 10
#define BOARDS_MAX 15
extern int BOARDS_LAST;
......
......@@ -23,7 +23,7 @@ OBJS = pespmsim.o espmsim1.o espmsim2.o serial.o tcp.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -oespmsim $(LIBS)
......
......@@ -23,6 +23,7 @@ OBJS = pespmsim.o espmsim1.o espmsim2.o serial.o tcp.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -oespmsim_X11 $(LIBS)
......
......@@ -11,6 +11,7 @@ OBJS = cespmsim.o espmsim1.o serial.o tcp.o ../LXRAD_WX/libteste/liblxrad.a
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -ocespmsim $(LIBS)
......
......@@ -18,6 +18,7 @@ OBJS = pespmsim.o espmsim1.o espmsim2.o serial.o tcp.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(WINDRES) espmsim_res.rc -O coff -o espmsim_res.o
......
......@@ -18,6 +18,7 @@ OBJS = pespmsim.o espmsim1.o espmsim2.o serial.o tcp.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(WINDRES) espmsim_res.rc -O coff -o espmsim_res.o
......
......@@ -23,6 +23,7 @@ OBJS = pespmsim.o espmsim1.o espmsim2.o serial.o tcp.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -oespmsim $(LIBS)
......
......@@ -23,6 +23,8 @@ OBJS = psrtank.o srtank1.o srtank2.o serial.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -osrtank $(LIBS)
......
......@@ -23,6 +23,8 @@ OBJS = psrtank.o srtank1.o srtank2.o serial.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -osrtank_X11 $(LIBS)
......
......@@ -14,6 +14,8 @@ LIBS+= -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1-x86_64-w64-mingw32 -l
OBJS = psrtank.o srtank1.o srtank2.o serial.o
exp: all
all: $(OBJS)
$(WINDRES) srtank_res.rc -O coff -o srtank_res.o
$(CC) $(FLAGS) $(OBJS) srtank_res.o -osrtank.exe $(LIBS)
......
......@@ -14,6 +14,8 @@ LIBS+= -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1-i686-w64-mingw32 -lwx
OBJS = psrtank.o srtank1.o srtank2.o serial.o
exp: all
all: $(OBJS)
$(WINDRES) srtank_res.rc -O coff -o srtank_res.o
$(CC) $(FLAGS) $(OBJS) srtank_res.o -osrtank.exe $(LIBS)
......
......@@ -23,6 +23,8 @@ OBJS = psrtank.o srtank1.o srtank2.o serial.o
#lxrad automatic generated block end, don't edit above!
exp: all
all: $(OBJS)
$(CC) $(FLAGS) $(OBJS) -osrtank $(LIBS)
......
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