Skip to content

Conversation

@alfred2g
Copy link
Contributor

@alfred2g alfred2g commented Aug 12, 2020

Revert uncrustify for untested portable directories

Description

Uncrustify messed up some inline assembly for some compilers
We are reverting some compiler directories inside portable

Test Steps

already changed folders/files after previous uncrustify

   portable/ARMv8M/non_secure/port.c
   portable/ARMv8M/non_secure_port.c

   portable/GCC/ARM_CM23/non_secure/port.c
   portable/GCC/ARM_CM23_NTZ/non_secure/port.c
   portable/GCC/ARM_CM33/non_secure/port.c
   portable/GCC/ARM_CM33_NTZ/non_secure/port.c
   portable/GCC/ARM_CM4_MPU/port.c
   portable/GCC/ARM_CM4_MPU/portmacro.h
   portable/GCC/ARM_CM0/port.c
   portable/GCC/ARM_CM3/port.c
   portable/GCC/ARM_CM3_MPU/port.c
   portable/GCC/ARM_CM4F/port.c
   portable/GCC/ARM_CM7/r0p1/port.c
   portable/GCC/AVR_AVRDx/port.c
   portable/GCC/AVR_AVRDx/porthardware.h
   portable/GCC/AVR_AVRDx/portmacro.h
   portable/GCC/AVR_Mega0/port.c
   portable/GCC/AVR_Mega0/porthardware.h
   portable/GCC/AVR_Mega0/portmacro.h
   portable/GCC/ARM_CR5/port.c

   portable/ThirdParty/GCC/ARC_EM_HS/freertos_tls.c
   portable/ThirdParty/GCC/ARC_EM_HS/port.c
   portable/ThirdParty/GCC/ARC_EM_HS/portmacro.h
   portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
   portable/ThirdParty/GCC/Xtensa_ESP32/port.c
   portable/ThirdParty/GCC/Xtensa_ESP32/portasm.S
   portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c
   portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_intr.c
   portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vector_defaults.S
   portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S

   portable/IAR/ARM_CM23/non_secure/port.c
   portable/IAR/ARM_CM23_NTZ/non_secure/port.c
   portable/IAR/ARM_CM33/non_secure/port.c
   portable/IAR/ARM_CM33_NTZ/non_secure/port.c
                                                                                                                                                                                     
   portable/IAR/ARM_CM4F_MPU/port.c
   portable/IAR/ARM_CM4F_MPU/portasm.s
   portable/IAR/ARM_CM4F_MPU/portmacro.h

   portable/IAR/ARM_CM0/port.c

   portable/IAR/ARM_CM3/port.c
   portable/IAR/ARM_CM4F/port.c

   portable/IAR/ARM_CM7/r0p1/port.c

   portable/IAR/AVR_AVRDx/port.c
   portable/IAR/AVR_AVRDx/porthardware.h
   portable/IAR/AVR_AVRDx/portmacro.h
   portable/IAR/AVR_AVRDx/portmacro.s90
   portable/IAR/AVR_Mega0/port.c
   portable/IAR/AVR_Mega0/porthardware.h
   portable/IAR/AVR_Mega0/portmacro.h
   portable/IAR/AVR_Mega0/portmacro.s90

   portable/RVDS/ARM_CM0/port.c
   portable/RVDS/ARM_CM3/port.c
   portable/RVDS/ARM_CM4F/port.c
   portable/RVDS/ARM_CM7/r0p1/port.c
   portable/RVDS/ARM_CM4_MPU/port.c
   portable/RVDS/ARM_CM4_MPU/portmacro.h

   portable/MemMang/heap_4.c

   portable/CCS/ARM_CM3/port.c
   portable/CCS/ARM_CM4F/port.c

   portable/MikroC/ARM_CM4F/port.c

   portable/Tasking/ARM_CM4F/port.c

   portable/Common/mpu_wrappers.c

Related Issue

90, 91, 107, 111

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@alfred2g alfred2g requested a review from cobusve August 12, 2020 05:10
@cobusve cobusve changed the title Style: Revert uncrustify for untested portable directories Style: Revert uncrustify for portable directories Aug 13, 2020
@NoMaY-jp
Copy link
Contributor

NoMaY-jp commented Aug 14, 2020

Will uncrustify be executed in the future again? If so, how do you separate source files into the following two groups? Manually? or by something like shell script?

GROUP-A) Execute uncrustify
GROUP-B) Do not execute uncrustify

Or... (if necessary,) will we have to use the following comments in all source files? (This is a question, not a disagreement.)

/* *INDENT-OFF* */
/* *INDENT-ON* */

Renesas CC-RX's assembly source file (such as *.src) cannot accept such comments which do not start with ';'. On the other hand, IAR ICCRL78 assembly source file (such as *.s87) can accept such C-style comments at least the latest version of EWRL78.

[Added]

I notice a tip to embed such comments into Renesas CC-RX's assembly source file (*.src). Using conditioal assemble statement .IF ~ .ENDIF makes it possible as follows. (But I notice just now that *.src files are excluded from 'Style: Uncrustify' target files.)

FreeRTOS/Source/portable/Renesas/X600v2/prt_asm.src (Moreover this file doesn't need uncrustify.)

.IF 0
/*
 * FreeRTOS Kernel V10.3.1
 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
... omit...
 */
/* *INDENT-OFF* */
.ENDIF

        .GLB    _vSoftwareInterruptISR
        .GLB    _vSoftwareInterruptEntry

        .SECTION   P,CODE

_vSoftwareInterruptEntry:

    BRA _vSoftwareInterruptISR

        .RVECTOR    27, _vSoftwareInterruptEntry

        .END

@alfred2g alfred2g requested a review from n9wxu August 14, 2020 19:43
@alfred2g alfred2g merged commit 46c1bd6 into FreeRTOS:master Aug 14, 2020
@alfred2g
Copy link
Contributor Author

Hi @NoMaY-jp

We will be using a github script hook to seprarate both groups, we will eventually uncrustify all the files

@alfred2g alfred2g removed the request for review from cobusve August 14, 2020 22:38
@alfred2g
Copy link
Contributor Author

Or... (if necessary,) will we have to use the following comments in all source files? (This is a question, not a disagreement.)

/* INDENT-OFF /
/
INDENT-ON */

we still have to use these around some assembly instructions, as uncrustify can't detect all ASM uses, and is trying to format them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants