AnsweredAssumed Answered

Non-std character in CMSIS source code

Question asked by mouser on Dec 28, 2015
Latest reply on Dec 29, 2015 by Uwe Bonnes
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