cancel
Showing results for 
Search instead for 
Did you mean: 

Non-std character in CMSIS source code

estie
Associate II
Posted on December 28, 2015 at 19:05

The boiler-plate header section of the .h files in the STM32 section of CMSIS have a stray non-standard ISO character the messes up standard unix / linux system tools, eg. grep , sed , etc.

This seems to be automatically reproduced in each file so this character is identically present in line 12 of every file in the CMSIS/ST/STM32F4xx directory. It is the apostrophe in ''peripheral's''. This odd character is causing a false end of line for sed and causing grep to see these files as ''binary'' and not display text matches. A test case is to try to find occurrences of a defined constant using grep:

grep -R SPI_CR2_DS_2 .

The .h files are reported as being binary and search results are not displayed. Expected result: the code base should use standard ISO characters accessible on all platforms. /** ****************************************************************************** * @file stm32f407xx.h * @author MCD Application Team * @version V2.4.2 * @date 13-November-2015 * @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File. * * This file contains: * - Data structures and the address mapping for all peripherals * - Peripheral's registers declarations and bits definition * - Macros to access peripheral's registers hardware * ******************************************************************************
2 REPLIES 2
Amel NASRI
ST Employee
Posted on December 29, 2015 at 14:40

Hi mouser,

Thanks for bringing this feedback to our attention. It is reported internally.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Uwe Bonnes
Principal III
Posted on December 29, 2015 at 15:39

There is also a lot of trailing whitespace in those files.