Skip to content

Commit

Permalink
Fixup build on modern gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay authored and shymega committed Jul 19, 2024
1 parent 0751b1c commit f0f508c
Show file tree
Hide file tree
Showing 41 changed files with 88 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/anc/inc/anc_wnr.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifndef __ANC_WNR_H__
#define __ANC_WNR_H__

// #include "plat_types.h"
#include <stdint.h>
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions apps/audioplayers/a2dp_decoder/a2dp_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
****************************************************************************/
// Standard C Included Files
#define __STDC_LIMIT_MACROS
#include "a2dp_decoder.h"
#include "a2dp_decoder_internal.h"
#include "app_audio.h"
Expand Down
1 change: 1 addition & 0 deletions apps/audioplayers/a2dp_decoder/a2dp_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "app_utils.h"
#include "avdtp_api.h"
#include "plat_types.h"

#define A2DP_DECODER_HISTORY_SEQ_SAVE (25)
//#define A2DP_DECODER_HISTORY_LOCTIME_SAVE (1)
Expand Down
2 changes: 2 additions & 0 deletions apps/audioplayers/a2dp_decoder/a2dp_decoder_aac_lc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
****************************************************************************/
// Standard C Included Files
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#include "a2dp_decoder_internal.h"
#include "cmsis.h"
#include "cmsis_os.h"
Expand Down
1 change: 1 addition & 0 deletions apps/audioplayers/a2dp_decoder/a2dp_decoder_cp.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {

#include "stdint.h"
#include "stdbool.h"
#include "plat_types.h"

enum CP_PROC_DELAY_T {
CP_PROC_DELAY_0_FRAME = 0,
Expand Down
2 changes: 2 additions & 0 deletions apps/audioplayers/a2dp_decoder/a2dp_decoder_sbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
****************************************************************************/
// Standard C Included Files
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#include "a2dp_decoder_internal.h"
#include "cmsis.h"
#include "cmsis_os.h"
Expand Down
3 changes: 2 additions & 1 deletion apps/audioplayers/plc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stdint.h>
#include <stdbool.h>
#include "plat_types.h"

typedef enum plc_type
{
Expand Down Expand Up @@ -51,4 +52,4 @@ void packet_loss_detection_report(PacketLossState *st);
}
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion apps/battery/app_battery.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {
#endif

#include <stdint.h>

#include "plat_types.h"

#define APP_BATTERY_LEVEL_MIN (0)

Expand Down
5 changes: 5 additions & 0 deletions apps/common/app_spec_ostimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* trademark and other intellectual property rights.
*
****************************************************************************/
#define __STDC_LIMIT_MACROS
#include <stdint.h>

#include "cmsis_os.h"
#include "stdint.h"
#include "app_spec_ostimer.h"
#include "cmsis_os.h"
#include "hal_trace.h"
Expand Down
1 change: 1 addition & 0 deletions apps/common/app_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __APP_THREAD_H__
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions apps/factory/app_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __APP_FACTORY_H__
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"
#define APP_FACTORY_TRACE(s, ...) TRACE(s, ##__VA_ARGS__)

void app_factorymode_result_set(bool result);
Expand Down
5 changes: 5 additions & 0 deletions include/rtos/rtx/cmsis_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ extern "C"
{
#endif

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

#include "os_tcb.h"

// ==== Enumeration, structures, defines ====
Expand Down
6 changes: 5 additions & 1 deletion platform/cmsis/inc/arm_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,14 @@
* @defgroup groupExamples Examples
*/


#ifndef _ARM_MATH_H
#define _ARM_MATH_H

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

/* Compiler specific diagnostic adjustment */
#if defined ( __CC_ARM )

Expand Down
5 changes: 5 additions & 0 deletions platform/cmsis/inc/cmsis_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
#define __has_builtin(x) (0)
#endif

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

/* CMSIS compiler specific defines */
#ifndef __ASM
#define __ASM __asm
Expand Down
7 changes: 7 additions & 0 deletions platform/cmsis/inc/core_cm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@

#ifndef __ASSEMBLER__
#include <stdint.h>

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

#endif

#ifdef __cplusplus
extern "C" {
#endif


/**
\page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions
CMSIS violates the following MISRA-C:2004 rules:
Expand Down
5 changes: 5 additions & 0 deletions platform/cmsis/inc/mpu_armv7.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
* limitations under the License.
*/

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

#if defined ( __ICCARM__ )
#pragma system_include /* treat file as system include file for MISRA check */
#elif defined (__clang__)
Expand Down
5 changes: 5 additions & 0 deletions platform/hal/best2300p/hal_cmu_best2300p.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
extern "C" {
#endif

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

#define HAL_CMU_VALID_CRYSTAL_FREQ { 26000000, 24000000, 40000000, 48000000, }

enum HAL_CMU_MOD_ID_T {
Expand Down
5 changes: 5 additions & 0 deletions platform/hal/hal_aud.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ extern "C" {

#include <stdint.h>

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

#define CODEC_FREQ_24M 24000000
#define CODEC_FREQ_26M 26000000
#define CODEC_FREQ_24P576M 24576000
Expand Down
1 change: 1 addition & 0 deletions platform/hal/hal_bootmode.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern "C" {
#endif

#include "stdint.h"
#include "plat_types.h"

#define HAL_HW_BOOTMODE_MASK (0xF << 0)
#define HAL_SW_BOOTMODE_MASK (0x0FFFFFFF << 4)
Expand Down
3 changes: 2 additions & 1 deletion platform/hal/hal_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __HAL_CMD_H__

#include "stdint.h"
#include "plat_types.h"

// typedef enum {
// HAL_CMD_ERR_NONE = 0x00,
Expand Down Expand Up @@ -102,4 +103,4 @@ void hal_cmd_tx_process (uint8_t** ppbuf, uint16_t* plen);
#endif
// hal_cmd_t *hal_cmd_get_ptr(void);

#endif
#endif
2 changes: 2 additions & 0 deletions platform/hal/hal_cmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ extern "C" {

#include "plat_addr_map.h"
#include "stdint.h"
#include "plat_types.h"

#include CHIP_SPECIFIC_HDR(hal_cmu)

#ifndef HAL_CMU_DEFAULT_CRYSTAL_FREQ
Expand Down
1 change: 1 addition & 0 deletions platform/hal/hal_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {

#include "stdint.h"
#include "stdbool.h"
#include "plat_types.h"

#define HAL_DMA_CHAN_NONE 0xFF

Expand Down
2 changes: 2 additions & 0 deletions platform/hal/hal_overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <stdbool.h>
#include <stdint.h>

#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
1 change: 1 addition & 0 deletions platform/hal/hal_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {

#include "stdint.h"
#include "stdbool.h"
#include "plat_types.h"

enum HAL_SPI_MOD_CLK_SEL_T {
HAL_SPI_MOD_CLK_SEL_NONE,
Expand Down
2 changes: 1 addition & 1 deletion platform/hal/hal_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
extern "C" {
#endif

#include "hal_cmu.h"
#include "plat_types.h"
#include "hal_cmu.h"

//=============================================================================
// Slow Timer (Default Timer)
Expand Down
2 changes: 1 addition & 1 deletion platform/hal/hal_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
extern "C" {
#endif

#include "hal_trace_mod.h"
#include "plat_types.h"
#include "hal_trace_mod.h"

#if 0
#define AUDIO_DEBUG
Expand Down
5 changes: 5 additions & 0 deletions platform/hal/plat_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ extern "C" {
#include "stdint.h"
#include "stdbool.h"

#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned long u32;
Expand Down
1 change: 1 addition & 0 deletions services/app_ibrt/inc/app_ibrt_auto_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#ifndef __APP_IBRT_AUTO_TEST_H__
#define __APP_IBRT_AUTO_TEST_H__
#include <stdint.h>
#include "plat_types.h"

typedef struct
{
Expand Down
2 changes: 1 addition & 1 deletion services/app_ibrt/inc/app_ibrt_peripheral_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef __APP_IBRT_PERIPHERAL_MANAGER_H__
#define __APP_IBRT_PERIPHERAL_MANAGER_H__
#include <stdint.h>

#include "plat_types.h"
/*************************
* automate_cmd format
* item len(byte)
Expand Down
2 changes: 1 addition & 1 deletion services/app_ibrt/inc/app_ibrt_voice_report.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef __APP_IBRT_VOICE_REPORT_H__
#define __APP_IBRT_VOICE_REPORT_H__
#include <stdint.h>

#include "plat_types.h"
typedef struct {
uint32_t aud_id;
uint32_t aud_pram;
Expand Down
3 changes: 2 additions & 1 deletion services/audio_dump/include/audio_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __AUDIO_DUMP_H__
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -44,4 +45,4 @@ void data_dump_run(const char *str, void *data_buf, uint32_t data_len);
}
#endif

#endif
#endif
2 changes: 2 additions & 0 deletions services/bt_app/app_bt.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifdef __cplusplus
extern "C" {
#endif

#include "plat_types.h"
#include "me_api.h"
#include "a2dp_api.h"
#include "hfp_api.h"
Expand Down
1 change: 1 addition & 0 deletions services/bt_app/app_ring_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __APP_RING_MERGE_H__

#include <stdint.h>
#include "plat_types.h"

enum APP_RING_MERGE_PLAY_T {
APP_RING_MERGE_PLAY_ONESHOT = 0,
Expand Down
1 change: 1 addition & 0 deletions services/bt_app/audio_prompt_sbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "stdint.h"
#include "cqueue.h"
#include "codec_sbc.h"
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions services/bt_if_enhanced/inc/bluetooth.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "stdint.h"
#include "string.h"
#include "btif_sys_config.h"
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 2 additions & 0 deletions services/bt_if_enhanced/inc/me_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
#include "bluetooth.h"
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"

typedef uint8_t btif_event_type_t;

#if defined(BTIF_HCI_HOST_FLOW_CONTROL) && defined(__IAG_BLE_INCLUDE__)
#define BTIF_BTEVENT_CONNECT_CPMPLETE 1

#endif /* */

#define BTIF_BTEVENT_INQUIRY_RESULT 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __CUSTOMPARAM_SECTION_H__
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions services/nv_section/factory_section/factory_section.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __FACTORY_SECTIONS_H__
#include <stdbool.h>
#include <stdint.h>
#include "plat_types.h"

#define ALIGN4 __attribute__((aligned(4)))
#define nvrec_mini_version 1
Expand Down
Loading

0 comments on commit f0f508c

Please sign in to comment.