Skip to content

Commit 61d95ad

Browse files
committed
Small fixes
1 parent d79b94a commit 61d95ad

File tree

3 files changed

+17
-32
lines changed

3 files changed

+17
-32
lines changed

Makefile

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ OBJ = src/main.o src/serial.o src/slip.o src/command.o src/render.o src/ini.o sr
55
DEPS = src/serial.h src/slip.h src/command.h src/render.h src/ini.h src/config.h src/input.h src/fx_cube.h src/audio.h src/ringbuffer.h src/inline_font.h src/SDL2_compat.h
66

77
#Any special libraries you are using in your project (e.g. -lbcm2835 -lrt `pkg-config --libs gtk+-3.0` ), or leave blank
8-
#INCLUDES = -L./lib -l:ld-linux-armhf.so.3 -l:libc.so.6 -l:libm.so.6 -l:libSDL2-2.0.so.0 -l:libvorbisfile.so.3 -l:libvorbis.so.0 -l:libogg.so.0 -l:libpng16.so.16 -l:libz.so.1 -l:libserialport.so
9-
INCLUDES = -L/root/workspace/libusb/libusb/.libs -L/root/workspace/m8c-sdl_1/deps/SDL_gfx-2.0.27/.libs -lSDL_gfx -lusb-1.0 -lSDL
8+
INCLUDES = -L/root/workspace/m8c-rg35xx/deps/libusb/libusb/.libs -L/root/workspace/m8c-rg35xx/deps/SDL_gfx.libs -lSDL_gfx -lusb-1.0 -lSDL
109

1110
#Set any compiler flags you want to use (e.g. -I/usr/include/somefolder `pkg-config --cflags gtk+-3.0` ), or leave blank
12-
#local_CFLAGS = -nolibc -D_REENTRANT -Wl,-rpath=lib/ -Wl,--dynamic-linker=lib/ld-linux-armhf.so.3 -Wall -O2 -pipe -I. -I/opt/rg35xx/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/local/include/SDL2 -I/opt/rg35xx/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/local/include/directfb -I/opt/rg35xx/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/local/include -DDEBUG_MSG=1
13-
local_CFLAGS = -Wall -O2 -pipe -I. -I/root/workspace/libusb/libusb/ -I/root/workspace/m8c-sdl_1/deps/SDL_gfx-2.0.27 $(shell pkg-config --cflags sdl) -DUSE_LIBUSB=1 -DDEBUG_MSG=1
11+
local_CFLAGS = -Wall -O2 -pipe -I. -I/root/workspace/m8c-rg35xx/deps/libusb/libusb/ -I/root/workspace/m8c-rg35xx/deps/SDL_gfx $(shell pkg-config --cflags sdl) -DUSE_LIBUSB=1 -DDEBUG_MSG=1
1412

1513
#Set the compiler you are using ( gcc for C or g++ for C++ )
1614
#CC = arm-buildroot-linux-gnueabihf-gcc
@@ -30,21 +28,8 @@ SOURCE_DIR = src/
3028
m8c: $(OBJ)
3129
$(CC) -o $@ $^ $(local_CFLAGS) $(INCLUDES)
3230

33-
libusb: INCLUDES = $(shell pkg-config --libs sdl libusb-1.0)
34-
libusb: local_CFLAGS = $(CFLAGS) $(shell pkg-config --cflags sdl libusb-1.0) -Wall -O2 -pipe -I. -DUSE_LIBUSB=1
35-
libusb: m8c
36-
3731
#Cleanup
3832
.PHONY: clean
3933

4034
clean:
41-
rm -f src/*.o *~ m8c
42-
43-
# PREFIX is environment variable, but if it is not set, then set default value
44-
ifeq ($(PREFIX),)
45-
PREFIX := /usr/local
46-
endif
47-
48-
install: m8c
49-
install -d $(DESTDIR)$(PREFIX)/bin/
50-
install -m 755 m8c $(DESTDIR)$(PREFIX)/bin/
35+
rm -f src/*.o *~ m8c

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ All interaction occurs through `libusb`, M8 command reception has been rewritten
1717
git clone [email protected]:edemirkan/rg35xx-toolchain.git toolchain
1818
cd toolchain
1919

20-
# Run container with toolchain
20+
# Clone project with deps
2121
mkdir workspace
22-
make shell
22+
git clone [email protected]:thirdegg/m8c-rg35xx workspace/m8c-rg35xx
23+
git clone [email protected]:ferzkopp/SDL_gfx.git workspace/m8c-rg35xx/deps/SDL_gfx
24+
git clone [email protected]:libusb/libusb.git workspace/m8c-rg35xx/deps/libusb
2325

24-
# Clone project
25-
git clone [email protected]:thirdegg/m8c-rg35xx m8c-rg35xx
26-
cd m8c-rg35xx
26+
# Run container with toolchain
27+
make shell
2728

28-
# Clone and build SDL_gfx
29-
git clone [email protected]:ferzkopp/SDL_gfx.git deps/SDL_gfx
30-
cd deps/SDL_gfx
29+
# Build SDL_gfx
30+
cd m8c-rg35xx/deps/SDL_gfx
3131
./configure --host=arm-linux --enable-mmx=no --enable-shared=no
3232
make
3333
cd -
3434

35-
# Clone and build libusb
36-
git clone [email protected]:libusb/libusb.git deps/libusb
37-
cd deps/libusb
38-
./configure --host=arm-linux
35+
# Build libusb
36+
cd m8c-rg35xx/deps/libusb
37+
apt install -y libtool
38+
./autogen.sh --host arm-linux --enable-udev=no --enable-shared=no
3939
make
4040
cd -
4141

@@ -47,7 +47,7 @@ exit
4747
## Running
4848

4949
1) Create a folder named `m8c/` on the flash drive in `Roms/APPS/`.
50-
2) Copy the executable file `m8c` from the `workspace/` folder into it.
50+
2) Copy the executable file `m8c` from the `toolchain/workspace/m8c-rg35xx` folder into it.
5151
3) Create a file `m8c.sh` in the `Roms/APPS/` folder with the following contents:
5252
```sh
5353
#!/bin/sh

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ config_params_s init_config() {
3333
c.wait_for_device = 1; // default to exit if device disconnected
3434
c.wait_packets = 1024; // default zero-byte attempts to disconnect (about 2
3535
// sec for default idle_ms)
36-
c.audio_enabled = 0; // route M8 audio to default output
36+
c.audio_enabled = 1; // route M8 audio to default output
3737
c.audio_buffer_size = 1024; // requested audio buffer size in samples
3838
c.audio_device_name = NULL; // Use this device, leave NULL to use the default output device
3939

0 commit comments

Comments
 (0)