OpenNuvoton / M2351BSP

M2351 BSP
15 stars 9 forks source link

Fix warnings #9

Closed tdrozdovsky closed 4 years ago

tdrozdovsky commented 4 years ago

I've fixed some inaccuracies that lead to a lot of warnings. Please check it.

tdrozdovsky commented 4 years ago

@wschang0 @yjchen5 @csyang2 Please check my pull request

wschang0 commented 4 years ago

We had reviewed the issue but we cannot see what you mentioned about. Could you give us more detail about your environment?

Regards, WS

From: tdrozdovsky notifications@github.com Sent: Thursday, December 12, 2019 7:43 PM To: OpenNuvoton/M2351BSP M2351BSP@noreply.github.com Cc: MS20 WSChang0 WSChang0@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/M2351BSP] Fix warnings (#9)

@wschang0https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_wschang0&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=f-ZcLE-eehR6fMtXlRv2Z62N5_U1dL0DV7jn79sP0Po&s=bGrxXZitVqF9GqTRd2N18s8CZFOulO-v50r3ZUxUTVg&e= @yjchen5https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_yjchen5&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=f-ZcLE-eehR6fMtXlRv2Z62N5_U1dL0DV7jn79sP0Po&s=8vCSUEf1SxJR8SA8eaOKMHmSyu2QNULzv0sTPe7AdtE&e= @csyang2https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_csyang2&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=f-ZcLE-eehR6fMtXlRv2Z62N5_U1dL0DV7jn79sP0Po&s=OWkKIPiiqOZkl7HP8LBPxx2fkRRBBuBm_AkXhlXRFf4&e= Please check my pull request

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_M2351BSP_pull_9-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAEM3XD6JEKIH2RNKBUU6KOLQYIPVHA5CNFSM4JZKT36KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGWM3IQ-23issuecomment-2D564972962&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=f-ZcLE-eehR6fMtXlRv2Z62N5_U1dL0DV7jn79sP0Po&s=hm-Q92v5f19gH4NrR4oU1_o8JRZxtImh74sdN5M5VbM&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AEM3XD43NHGRCOLQL6JBWELQYIPVHANCNFSM4JZKT36A&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=f-ZcLE-eehR6fMtXlRv2Z62N5_U1dL0DV7jn79sP0Po&s=d9RPwvhNGTVmMWDzxKe1ulRhz0MabwaFkIEibr4ftrg&e=.


The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

tdrozdovsky commented 4 years ago

@wschang0 For example ...

CC: portable/GCC/ARM_V8M/port.c
gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc -std=gnu99 -pipe -Wl,--gc-sections -Wall -Wextra -Wstrict-prototypes -Wshadow -Wundef -O1 -ffunction-sections -fdata-sections -mlittle-endian -mthumb -mcpu=cortex-m23 -march=armv8-m.base -Iinclude -D__ARM_FEATURE_DSP=0 -I./include -I./portable/GCC/ARM_V8M  -I./src/Device/Nuvoton/M2351/Include -I./CMSIS/Include -I./StdDriver/inc -DDEBUG_PORT=UART0_NS -c -o freertos/portable/GCC/ARM_V8M/port.o portable/GCC/ARM_V8M/port.c
In file included from ./portable/GCC/ARM_V8M/portmacro.h:58:0,
                 from ./include/portable.h:52,
                 from ./include/FreeRTOS.h:62,
                 from portable/GCC/ARM_V8M/port.c:54:
../src/Device/Nuvoton/M2351/Include/M2351.h:947:8: warning: "__ARMCC_VERSION" is not defined [-Wundef]
 #elif (__ARMCC_VERSION >= 6010050)
        ^~~~~~~~~~~~~~~
tdrozdovsky commented 4 years ago

@wschang0 P.S. The code shows that there are inaccuracies when using GCC

wschang0 commented 4 years ago

Do you use the eclipse project of M2351 sample code? We had try GNU C with eclipse to build the sample code and it is ok without warning.

If you still have problem, please tell us the eclipse project path of our BSP which have problem and what NuEclipse version you installed. Thanks!

Regards, WS

From: tdrozdovsky notifications@github.com Sent: Friday, December 13, 2019 12:35 PM To: OpenNuvoton/M2351BSP M2351BSP@noreply.github.com Cc: MS20 WSChang0 WSChang0@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/M2351BSP] Fix warnings (#9)

@wschang0https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_wschang0&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=5UeA9r1sejauUUJca1dpmkjFJ_L6ejesxMxo9alZWhg&s=LIViiU7S-LcpaXipAEA5By1xFVhfn0b53ZaG-sNCN7Y&e= P.S. The code shows that there are inaccuracies when using GCC

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_M2351BSP_pull_9-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAEM3XDYT3U7UX6KDXBT2ZZ3QYMGHRA5CNFSM4JZKT36KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGY34PA-23issuecomment-2D565296700&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=5UeA9r1sejauUUJca1dpmkjFJ_L6ejesxMxo9alZWhg&s=sUTvb38NM2e1-Vh6yi1baOuwjjtgVWdmOqj9TfJ8xnc&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AEM3XD22TL2DSLRX5IR2233QYMGHRANCNFSM4JZKT36A&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=5UeA9r1sejauUUJca1dpmkjFJ_L6ejesxMxo9alZWhg&s=_HKasxpykHXmZ_wRYxXv2TMXZUoiz7F83NUHoY-eNAU&e=.


The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

tdrozdovsky commented 4 years ago

@wschang0

  1. I do not use your eclipse.
  2. The code in this repository differs from that used in the eclipse. (I use the code of this repository).
  3. Look at this code and my PR and you can understand that there are inaccuracies here. (Please apply my PR).

P.S. Eclipse sample code also has many warnings, turn on the compiler options -Wall -Wextra to see them.

tdrozdovsky commented 4 years ago

@wschang0 I think in any case it is necessary to correct these warnings since users download this package and I think they are not pleased to see when the compiler issues such a number of warnings

wschang0 commented 4 years ago

As our test, we cannot find warning with our supporting tools. However, we will modify the M2351.h for the defined of __ARMCC_VERSION Thanks for your suggestions.

Regards, WS

From: tdrozdovsky notifications@github.com Sent: Monday, December 23, 2019 5:01 AM To: OpenNuvoton/M2351BSP M2351BSP@noreply.github.com Cc: MS20 WSChang0 WSChang0@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/M2351BSP] Fix warnings (#9)

@wschang0https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_wschang0&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=rzYfYxLVDdlfQwxWLWewhlZQK8F1qoTPIKl_d-gDCfk&s=7shfhzenRXlfbzLOfZWXwrPffBlCaOhwk_mfd_9c7lA&e= I think in any case it is necessary to correct these warnings since users download this package and I think they are not pleased to see when the compiler issues such a number of warnings

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_M2351BSP_pull_9-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAEM3XD724ZRSAR4EALEL67LQZ7ISBA5CNFSM4JZKT36KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHPZXOQ-23issuecomment-2D568302522&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=rzYfYxLVDdlfQwxWLWewhlZQK8F1qoTPIKl_d-gDCfk&s=rGqT7f8JGXNlUmSYjrDS8Yi0h8RGIeG8Gc4JlTiYSk8&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AEM3XDZI4AFV4FSSNFNSORDQZ7ISBANCNFSM4JZKT36A&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=aH6l7Kw2v9MTu3F0oJ3Ab6AQ_svbvBfhszKwCjHTnIo&m=rzYfYxLVDdlfQwxWLWewhlZQK8F1qoTPIKl_d-gDCfk&s=rc0B2TJ7WwMwte7L9DZll_pTdnTCN5oIe8c8H5FqcHI&e=.


The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.