Oct 12, 2021
10:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 12, 2021
10:34 PM
Hi,
if I add the component DS_ADC_DEMOD and XMC_ASSERT_ENABLE is defined (in menu
Active Project Properties / Tool Settings / ARM-GCC C Compiler / Preprocessor), then the compilation aborts with the following error:
../Dave/Generated/DS_ADC_DEMOD/ds_adc_demod.h: In function 'DS_ADC_DEMOD_CH_GetResult_AUX':
../Dave/Generated/DS_ADC_DEMOD/ds_adc_demod.h:417:67: error: 'HandlePtr' undeclared (first use in this function)
XMC_ASSERT("Invalid channel pointer", XMC_DSD_CHECK_CHANNEL_PTR(HandlePtr->dsd_ch_ptr[id]));
This bug is independent of the Dave version.
Regards
Karl
if I add the component DS_ADC_DEMOD and XMC_ASSERT_ENABLE is defined (in menu
Active Project Properties / Tool Settings / ARM-GCC C Compiler / Preprocessor), then the compilation aborts with the following error:
../Dave/Generated/DS_ADC_DEMOD/ds_adc_demod.h: In function 'DS_ADC_DEMOD_CH_GetResult_AUX':
../Dave/Generated/DS_ADC_DEMOD/ds_adc_demod.h:417:67: error: 'HandlePtr' undeclared (first use in this function)
XMC_ASSERT("Invalid channel pointer", XMC_DSD_CHECK_CHANNEL_PTR(HandlePtr->dsd_ch_ptr[id]));
This bug is independent of the Dave version.
Regards
Karl
Solved! Go to Solution.
- Tags:
- IFX
1 Solution
Dec 10, 2021
03:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 10, 2021
03:54 AM
Hi Karl,
Thanks for reporting the issue. You can modify the XMC_ASSERT condition on the generated file after all modification being done as the workaround.
Best regards,
Vasanth
2 Replies
Oct 12, 2021
10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 12, 2021
10:47 PM
Hi,
I propose the following solution:
1. In the file D_LibraryStore_4.4\resources\4.0.6\app\DS_ADC_DEMOD\0\Templates\ds_adc_demod.h
remove line 417
XMC_ASSERT ("Invalid channel pointer", XMC_DSD_CHECK_CHANNEL_PTR (HandlePtr-> dsd_ch_ptr [id]));
because the used argument in condition is wrong.
Better is a check in the function XMC_DSD_CH_GetResult_AUX () in file D_LibraryStore_4.4\DeviceFeatures\pack\2.2.12\Libraries\XMCLib\XMC4\inc\xmc_dsd.h
2. In the file D_LibraryStore_4.4\DeviceFeatures\pack\2.2.12\Libraries\XMCLib\XMC4\inc\xmc_dsd.h
2.1. In the function
__STATIC_INLINE void XMC_DSD_CH_GetResult(XMC_DSD_CH_t *const channel, int16_t *dsd_Result)
at line 785 inserted
XMC_ASSERT("XMC_DSD_CH_GetResult:Invalid module pointer", XMC_DSD_CHECK_CHANNEL_PTR(channel));
XMC_ASSERT("XMC_DSD_CH_GetResult:NULL Result Pointer", (dsd_Result != (int16_t *)NULL) );
2.2. In the function
__STATIC_INLINE void XMC_DSD_CH_GetResult_AUX(XMC_DSD_CH_t *const channel, int16_t *dsd_Result)
at line 839 inserted
XMC_ASSERT("XMC_DSD_CH_GetResult_AUX:Invalid module pointer", XMC_DSD_CHECK_CHANNEL_PTR(channel));
XMC_ASSERT("XMC_DSD_CH_GetResult_AUX:NULL Result Pointer", (dsd_Result != (int16_t *)NULL) );
Regards,
Karl
I propose the following solution:
1. In the file D_LibraryStore_4.4\resources\4.0.6\app\DS_ADC_DEMOD\0\Templates\ds_adc_demod.h
remove line 417
XMC_ASSERT ("Invalid channel pointer", XMC_DSD_CHECK_CHANNEL_PTR (HandlePtr-> dsd_ch_ptr [id]));
because the used argument in condition is wrong.
Better is a check in the function XMC_DSD_CH_GetResult_AUX () in file D_LibraryStore_4.4\DeviceFeatures\pack\2.2.12\Libraries\XMCLib\XMC4\inc\xmc_dsd.h
2. In the file D_LibraryStore_4.4\DeviceFeatures\pack\2.2.12\Libraries\XMCLib\XMC4\inc\xmc_dsd.h
2.1. In the function
__STATIC_INLINE void XMC_DSD_CH_GetResult(XMC_DSD_CH_t *const channel, int16_t *dsd_Result)
at line 785 inserted
XMC_ASSERT("XMC_DSD_CH_GetResult:Invalid module pointer", XMC_DSD_CHECK_CHANNEL_PTR(channel));
XMC_ASSERT("XMC_DSD_CH_GetResult:NULL Result Pointer", (dsd_Result != (int16_t *)NULL) );
2.2. In the function
__STATIC_INLINE void XMC_DSD_CH_GetResult_AUX(XMC_DSD_CH_t *const channel, int16_t *dsd_Result)
at line 839 inserted
XMC_ASSERT("XMC_DSD_CH_GetResult_AUX:Invalid module pointer", XMC_DSD_CHECK_CHANNEL_PTR(channel));
XMC_ASSERT("XMC_DSD_CH_GetResult_AUX:NULL Result Pointer", (dsd_Result != (int16_t *)NULL) );
Regards,
Karl
Dec 10, 2021
03:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 10, 2021
03:54 AM
Hi Karl,
Thanks for reporting the issue. You can modify the XMC_ASSERT condition on the generated file after all modification being done as the workaround.
Best regards,
Vasanth