瀏覽代碼

fix:(platform): 临界区结构体给无效值,避免malloc报错

RyanCW 2 年之前
父節點
當前提交
5170cc62f2
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      Makefile
  2. 1 1
      platform/quecOpen/platformSystem.h
  3. 1 0
      platform/rtthread/platformSystem.h

+ 1 - 1
Makefile

@@ -13,7 +13,7 @@ src += $(wildcard ./pahoMqtt/*.c)
 src += $(wildcard ./mqttclient/*.c)
 
 obj = $(patsubst %.c, %.o, $(src))
-target = app
+target = app.o
 CC = gcc
 
 $(target): $(obj)

+ 1 - 1
platform/quecOpen/platformSystem.h

@@ -28,7 +28,7 @@ extern "C"
 
     typedef struct
     {
-
+        uint8_t invalid; // 不使用,避免报错
     } platformCritical_t;
 
     extern void *platformMemoryMalloc(size_t size);

+ 1 - 0
platform/rtthread/platformSystem.h

@@ -31,6 +31,7 @@ extern "C"
 
     typedef struct
     {
+        uint8_t invalid; // 不使用,避免报错
     } platformCritical_t;
 
     extern void *platformMemoryMalloc(size_t size);