New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRF52 : Fix UART RTS initialization #8474

Merged
merged 1 commit into from Oct 24, 2018

Conversation

Projects
None yet
7 participants
@naveenkaje
Contributor

naveenkaje commented Oct 18, 2018

The pre-processor based macro check #if evaluates all enums as
0 and hence the code within #if does not get compiled. Hence
move this to a run-time check where the pin variable can be
correctly evaluated.

This is a follow on patch to:
#8046
The above PR does not work for NRF52840_DK and needs this fix.

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@naveenkaje

This comment has been minimized.

Contributor

naveenkaje commented Oct 18, 2018

@cmonr cmonr requested review from SenRamakri and c1728p9 Oct 18, 2018

@cmonr cmonr added the needs: review label Oct 18, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 18, 2018

This breaks NRF52840_DK and needs this fix.

The first 'this'. Do you mean the enum preprocessor issue?

@cmonr cmonr requested a review from marcuschangarm Oct 18, 2018

@naveenkaje

This comment has been minimized.

Contributor

naveenkaje commented Oct 18, 2018

@cmonr Sorry for the cryptic message. I changed it to "The above PR does not work for NRF52840_DK and needs this fix."

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 22, 2018

LGTM (cant approve as github is having issues), will start CI

/morph build

1 similar comment
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 22, 2018

LGTM (cant approve as github is having issues), will start CI

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 22, 2018

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 22, 2018

@naveenkaje naveenkaje force-pushed the naveenkaje:NRF_RTS_Followon_Fix branch from b7b69da to 1d4ef69 Oct 22, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 22, 2018

@naveenkaje Was this a rebase, or were the failure issues fixed and squashed? Hard to tell.

@naveenkaje naveenkaje force-pushed the naveenkaje:NRF_RTS_Followon_Fix branch from 1d4ef69 to ba132fe Oct 22, 2018

@naveenkaje

This comment has been minimized.

Contributor

naveenkaje commented Oct 22, 2018

@cmonr I had originally changed only targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c, but during CI I noted that the following files needed the RTS pin definition

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_DELTA_DFBM_NQ620/PinNames.h
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_MTB_UBLOX_NINA_B1/PinNames.h
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_RBLAB_BLENANO2/PinNames.h
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_UBLOX_EVA_NINA/PinNames.h

Hence I modified them and rebased on top of master.
Hope it's clear.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 22, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 22, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 23, 2018

Interesting. Looks like the last build issue is only with the DELTA_DFBM_NQ620 target.

@cmonr cmonr added needs: work and removed needs: review labels Oct 23, 2018

@naveenkaje

This comment has been minimized.

Contributor

naveenkaje commented Oct 23, 2018

Thanks @cmonr

It is caused due to multiply defined mbed_sdk_init() for that target.

TESTS/mbed_platform/system_reset/main.cpp
[DEBUG] Return: 0
Link: system_reset_application
Link: /usr/local/ARM_Compiler_5.06u3/bin/armlink --via /builds/ws/mbed-os-build-matrix/3430/DELTA_DFBM_NQ620_ARM/sources/mbed-os/BUILD/tests/DELTA_DFBM_NQ620/ARM/TESTS/mbed_platform/system_reset/.link_options.txt
[DEBUG] Return: 1
[DEBUG] Errors: Error: L6200E: Symbol mbed_sdk_init multiply defined (by BUILD/tests/DELTA_DFBM_NQ620/ARM/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.o and BUILD/tests/DELTA_DFBM_NQ620/ARM/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_DELTA_DFBM_NQ620/mbed_overrides.o).

Looking at the history, 56cf092 has brought this call for that target. The function is not doing anything particularly useful. It is declaring a couple of local variables. I propose to delete this file.

NRF52 : Fix UART RTS initialization
The preprocessor based macro check #if evaluates all
enums as 0 and hence the code does not get compiled.
Since move this to a runtime check where the pin variable
can be correctly evaluated.

Delete mbed_overrides.c as it has a target specific mbed_sdk_init() to
resolve linking problem.

This is a follow on patch to:
#8046

@naveenkaje naveenkaje force-pushed the naveenkaje:NRF_RTS_Followon_Fix branch from ba132fe to 7beb8d3 Oct 23, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 23, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 23, 2018

Build : SUCCESS

Build number : 3446
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8474/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 23, 2018

Job config fixed.
/morph test

1 similar comment
@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 23, 2018

Job config fixed.
/morph test

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 24, 2018

Waiting on new greentea tests. Should be about an hour until complete.

@0xc0170 0xc0170 merged commit ab6429f into ARMmbed:master Oct 24, 2018

15 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 674 files (+0 files)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9874 cycles (-338 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

naveenkaje added a commit to naveenkaje/mbed-os that referenced this pull request Dec 14, 2018

NRF52: Fix UART RTS Initialization
This change was based on original version of ARMmbed#8474.
After the reviews, the it changed from pre-processor based check to
code based check. Do the same here in this branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment