0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Simulink] Arduinoビルド時のエラー解決 (ext_types.h/ExtModeMalloc)

Last updated at Posted at 2022-02-19

Problem

ビルド時に自作のモデルをビルドしようとした際、
ExtModeMallocがすでにmem_mgr.c/hで宣言されているのに、マクロ定義しようとしてコンパイルエラーが発生する。
下記のマクロをコメントアウトすることで解決。今のところ特に問題はでていない。

Before modification:

C:\Program Files\MATLAB\R2021b\rtw\c\src\ext_mode\common\ext_types.h
#define malloc ExtModeMalloc
#define calloc ExtModeCalloc
#define free   ExtModeFree

After modification (Comment out 3 defines) :

C:\Program Files\MATLAB\R2021b\rtw\c\src\ext_mode\common\ext_types.h
// #define malloc ExtModeMalloc
// #define calloc ExtModeCalloc
// #define free   ExtModeFree

environment : R2021b, Simulink® Support Package for Arduino

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?