Skip to content

Commit debaa4c

Browse files
authored
Merge pull request #6 from PharosMarcusB/pharos_development
Small fixes, cleanups, and improvements
2 parents eef7367 + 6a0a4a5 commit debaa4c

File tree

4 files changed

+57
-57
lines changed

4 files changed

+57
-57
lines changed

.vscode/tasks.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build RDM Responder",
6+
"type": "shell",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"command": "make -f Makefile.GD32",
12+
"options": {
13+
"cwd": "${workspaceFolder}/gd32_rdm_responder/"
14+
}
15+
},
16+
{
17+
"label": "Clean RDM Responder",
18+
"type": "shell",
19+
"command": "make -f Makefile.GD32 clean",
20+
"options": {
21+
"cwd": "${workspaceFolder}/gd32_rdm_responder/"
22+
}
23+
},
24+
{
25+
"label": "Build DMX USB PRO",
26+
"type": "shell",
27+
"group": {
28+
"kind": "build"
29+
},
30+
"command": "make -f Makefile.GD32",
31+
"options": {
32+
"cwd": "${workspaceFolder}/gd32_dmx_usb_pro/"
33+
}
34+
},
35+
{
36+
"label": "Clean DMX USB PRO",
37+
"type": "shell",
38+
"group": {
39+
"kind": "build"
40+
},
41+
"command": "make -f Makefile.GD32 clean",
42+
"options": {
43+
"cwd": "${workspaceFolder}/gd32_dmx_usb_pro/"
44+
}
45+
}
46+
]
47+
}

firmware-template-gd32/lib/Rules.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ C_OBJECTS=$(foreach sdir,$(SRCDIR),$(patsubst $(sdir)/%.c,$(BUILD)$(sdir)/%.o,$(
5252
CPP_OBJECTS=$(foreach sdir,$(SRCDIR),$(patsubst $(sdir)/%.cpp,$(BUILD)$(sdir)/%.o,$(wildcard $(sdir)/*.cpp)))
5353
ASM_OBJECTS=$(foreach sdir,$(SRCDIR),$(patsubst $(sdir)/%.S,$(BUILD)$(sdir)/%.o,$(wildcard $(sdir)/*.S)))
5454

55-
EXTRA_C_OBJECTS=$(patsubst %.c,$(BUILD)%.o,$(EXTRA_C_SOURCE_FILES))
56-
EXTRA_C_DIRECTORIES=$(shell dirname $(EXTRA_C_SOURCE_FILES))
57-
EXTRA_BUILD_DIRS:=$(addsuffix $(EXTRA_C_DIRECTORIES), $(BUILD))
55+
ifneq ($(EXTRA_C_SOURCE_FILES),)
56+
EXTRA_C_OBJECTS=$(patsubst %.c,$(BUILD)%.o,$(EXTRA_C_SOURCE_FILES))
57+
EXTRA_C_DIRECTORIES=$(shell dirname $(EXTRA_C_SOURCE_FILES))
58+
EXTRA_BUILD_DIRS:=$(addsuffix $(EXTRA_C_DIRECTORIES), $(BUILD))
59+
endif
5860

5961
OBJECTS:=$(strip $(ASM_OBJECTS) $(C_OBJECTS) $(CPP_OBJECTS) $(EXTRA_C_OBJECTS))
6062

@@ -83,7 +85,7 @@ all : builddirs $(TARGET)
8385

8486
builddirs:
8587
mkdir -p $(BUILD_DIRS)
86-
mkdir -p $(EXTRA_BUILD_DIRS)
88+
if [[ -n "${EXTRA_BUILD_DIRS}" ]]; then mkdir -p $(EXTRA_BUILD_DIRS); fi
8789
mkdir -p lib_gd32
8890

8991
clean:

gd32_rdm_responder/include/personalities.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

lib-rdm/include/rdmresponder.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#include "rdmhandler.h"
3535
#include "rdmdeviceresponder.h"
3636
#include "rdmpersonality.h"
37+
#ifndef NDEBUG
38+
# include "rdm_message_print.h"
39+
#endif
3740

3841
#include "dmxreceiver.h"
3942

@@ -165,7 +168,7 @@ class RDMResponder final : DMXReceiver, public RDMDeviceResponder, RDMHandler {
165168
}
166169

167170
#ifndef NDEBUG
168-
if (nLength != INVALID_RESPONSE) {
171+
if (nLength != rdm::responder::INVALID_RESPONSE) {
169172
rdm::message_print(pResponse);
170173
}
171174
#endif

0 commit comments

Comments
 (0)