Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
74 stars 57 forks source link

Strip whitespaces when copy information to `RTE_Components.h` #1542

Closed ReinhardKeil closed 1 month ago

ReinhardKeil commented 4 months ago

The Problem To Be Solved

Currently only the first line of #define information leading whitespaces are stripped. The output in RTE_Components.h is therefore:

/*
 * CSOLUTION generated file: DO NOT EDIT!
 * Generated by: csolution version 2.4.0
 *
 * Project: 'HID.Debug+B-U585I-IOT02A' 
 * Target:  'Debug+B-U585I-IOT02A' 
 */

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H

/* ARM::CMSIS-Compiler:STDERR:Custom@1.1.0 */
#define RTE_CMSIS_Compiler_STDERR                /* CMSIS-Compiler STDERR */
        #define RTE_CMSIS_Compiler_STDERR_Custom         /* CMSIS-Compiler STDERR: Custom */
/* ARM::CMSIS-Compiler:STDIN:Custom@1.1.0 */

Suggest A Solution Strip whitespace characters when copy information for *.PDSC file to RTE_Components.h so that the output is:

/*
 * CSOLUTION generated file: DO NOT EDIT!
 * Generated by: csolution version 2.4.0
 *
 * Project: 'HID.Debug+B-U585I-IOT02A' 
 * Target:  'Debug+B-U585I-IOT02A' 
 */

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H

/* ARM::CMSIS-Compiler:STDERR:Custom@1.1.0 */
#define RTE_CMSIS_Compiler_STDERR                /* CMSIS-Compiler STDERR */
#define RTE_CMSIS_Compiler_STDERR_Custom         /* CMSIS-Compiler STDERR: Custom */
/* ARM::CMSIS-Compiler:STDIN:Custom@1.1.0 */

For completeness: