From 2121f530c8578536dbf0294336a54d0498069799 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Sun, 5 Oct 2014 11:05:56 +0000 Subject: [PATCH] fix warning on MSP430X check for other targets --- chipset-cc256x/bt_control_cc256x.c | 4 ++-- chipset-cc256x/convert_bts_init_scripts.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chipset-cc256x/bt_control_cc256x.c b/chipset-cc256x/bt_control_cc256x.c index f1ac5660c..91783e5fd 100644 --- a/chipset-cc256x/bt_control_cc256x.c +++ b/chipset-cc256x/bt_control_cc256x.c @@ -62,7 +62,7 @@ #include #include /* memcpy */ -#if defined(__GNUC__) && (__MSP430X__ > 0) +#if defined(__GNUC__) && defined(__MSP430X__) && (__MSP430X__ > 0) #include "hal_compat.h" #endif @@ -198,7 +198,7 @@ static int bt_control_cc256x_next_cmd(void *config, uint8_t *hci_cmd_buffer){ init_script_offset++; // extracted init script has 0x01 cmd packet type, but BTstack expects them without -#if defined(__GNUC__) && (__MSP430X__ > 0) +#if defined(__GNUC__) && defined(__MSP430X__) && (__MSP430X__ > 0) // workaround: use FlashReadBlock with 32-bit integer and assume init script starts at 0x10000 uint32_t init_script_addr = 0x10000; diff --git a/chipset-cc256x/convert_bts_init_scripts.py b/chipset-cc256x/convert_bts_init_scripts.py index 9b43cdef7..4e1689eb8 100755 --- a/chipset-cc256x/convert_bts_init_scripts.py +++ b/chipset-cc256x/convert_bts_init_scripts.py @@ -18,7 +18,7 @@ Then, unzip it and copy the *.bts file into this folder and start the script aga ''' fartext = ''' -#if defined(__GNUC__) && (__MSP430X__ > 0) +#if defined(__GNUC__) && defined(__MSP430X__) && (__MSP430X__ > 0) __attribute__((section (".fartext"))) #endif #ifdef __AVR__ @@ -141,7 +141,7 @@ def convert_bts(bts_file): if (part > 1): suffix = '_{0}'.format(part) - fout.write('#if defined(__GNUC__) && (__MSP430X__ > 0)\n') + fout.write('#if defined(__GNUC__) && defined(__GNUC__) && (__MSP430X__ > 0)\n') fout.write('};\n') fout.write('__attribute__((section (".fartext")))\n')