You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /home/eric-busch/Workspace/msdk/Libraries/CMSIS/Device/Maxim/MAX32655/Include/max32655.h:257,
from /home/eric-busch/Workspace/msdk/Libraries/PeriphDrivers/Include/MAX32655/mxc_device.h:24,
from ../../../../../Libraries/RF-PHY/MAX32655/include/dbb_registers.h:51,
from inc/tester.hpp:14,
from src/tester.cpp:7:
core_cm4.h:222: warning: "__I" redefined
where it is previously defined
gpio_regs.h:53: note: this is the location of the previous definition
core_cm4.h
#ifdef__cplusplus#define__I volatile /*!< Defines 'read only' permissions */#else#define__I volatile const /*!< Defines 'read only' permissions */#endif#define__O volatile /*!< Defines 'write only' permissions */#define__IO volatile /*!< Defines 'read / write' permissions *//* following defines should be used for structure members */#define__IM volatile const /*! Defines 'read only' structure member permissions */#define__OM volatile /*! Defines 'write only' structure member permissions */#define__IOM volatile /*! Defines 'read / write' structure member permissions */
What doesn't make sense to me is volatile const basically says its hardware that can only be read by the software, which makes sense for the input. Why c++ matters is beyond me. Seems like a bug, but is clearly intentional.
I am working on an internal project with c++.
I am getting a redefinition error
In file included from /home/eric-busch/Workspace/msdk/Libraries/CMSIS/Device/Maxim/MAX32655/Include/max32655.h:257, from /home/eric-busch/Workspace/msdk/Libraries/PeriphDrivers/Include/MAX32655/mxc_device.h:24, from ../../../../../Libraries/RF-PHY/MAX32655/include/dbb_registers.h:51, from inc/tester.hpp:14, from src/tester.cpp:7: core_cm4.h:222: warning: "__I" redefined
where it is previously defined
core_cm4.h
What doesn't make sense to me is volatile const basically says its hardware that can only be read by the software, which makes sense for the input. Why c++ matters is beyond me. Seems like a bug, but is clearly intentional.
gpio_regs.h
There must be some place core_cm4.h is getting included after gpio_regs.h
Only reason it is not an issue before is the defs are the same when using c.
Option 1: basically copy the core_cm4.h files. or
It looks like this
Only
gpio_regs.h
anddbb_ctrl_regs.h
have this issue.Option 2:
#include "core_cm4.h"
and only define__R
If you have a better idea let me know.
@sihyung-maxim @Jake-Carter
The text was updated successfully, but these errors were encountered: