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

LPC1769 port #5025

Merged
merged 3 commits into from Oct 26, 2017

Conversation

Projects
None yet
7 participants
@grygorek
Contributor

grygorek commented Sep 5, 2017

Description

  • LPCXpresso LPC1769 is a similar board as mbed LPC1768. It has a different pinout and different eth phy chip. The blinky example was compiled with IAR and GCC_ARM. The driver for eth phy is not provided and LWIP cannot be included in a build.

  • Update of the SAMR21 Xplained Pro board support to mbed OS 5. The blinky example was build with IAR and GCC_ARM. Other components were not tested.

Status

READY

Migrations

Changes to API
NO

LPCXpresso LPC1769 board ported
The blinky example compiles and runs.
The board has a different eth phy component than mbed LPC1768. It requires a driver.
@chrissnow

This comment has been minimized.

Contributor

chrissnow commented Sep 5, 2017

I have been using the EA LPC1769 board for a while now and it works fine if you build against LPC1768 (including ethernet)

The PHY is different but the driver is basically identical.

@grygorek

This comment has been minimized.

Contributor

grygorek commented Sep 6, 2017

Thanks Chris,
The LPC1768 and LPC1769 are almost the same MCUs. I cant see the difference other than max frequency clock (100MHz vs 120MHz). Not surprised the LPC1768 may works on an EA board.

However the pinout of EA board and mbed boards is different. In eg. the LED is connected to a different pin.

This is my first contribution ever. I am learning how to do the things so, i took it easy :-).

@chrissnow

This comment has been minimized.

Contributor

chrissnow commented Sep 6, 2017

I would suggest inheriting the LPC1768 in the target and conditional compile the pin names, less duplication that way.

A couple of other things to bear in mind though..

the CMSIS-DAP implementation doesn't support drag and drop.
the USB-Serial is not connected or enabled.

These two omissions don't make it the most friendly mbed target.

@JojoS62

This comment has been minimized.

Contributor

JojoS62 commented Sep 6, 2017

the CMSIS-DAP implementation doesn't support drag and drop.
the USB-Serial is not connected or enabled.

The actual rev. D/D1 use a LPC11U35H_501 for the debug probe, so it should be possible to replace the firmware by the DAPLink software to make mbed compatible. And when the MCUXpresso exporter is merged it will be also very easy to use this board with the offline IDE.

USB and Eth have the necessary hardware on board, only the connectors are needed. Maybe not the best solution for an education board, but great for integration in own projects.
Also the target_lpc176x/ethernet_api.c contains the code for PHY LAN8720, so this should work also out of the box.

There are already a few revisions for this board, the new one has a RGB LED with P3_26 blue and P3_25 green. I suggest to add these definitions also to the pinnames.h.

@grygorek

This comment has been minimized.

Contributor

grygorek commented Sep 6, 2017

I would suggest inheriting the LPC1768 in the target and conditional compile the pin names, less duplication that way.

Thats done. The LPC1769 will point to mbed LPC1769.

Also the target_lpc176x/ethernet_api.c contains the code for PHY LAN8720, so this should work also out of the box.

That's right. It turned out the problem with the LWIP and ethernet was not this driver but the conditional compile in lpc17_emac.c, which failed with TARGET_LPC1769 and not TARGET_LPC1768. I updated this.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 19, 2017

Hi @grygorek . Thanks for the contribution.

Can you share testing results for these 2 updates ? It would be better if you could split as those 2 are not related changeset (adding lpc1769, update to SAM target)

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 19, 2017

cc @sg-

@grygorek

This comment has been minimized.

Contributor

grygorek commented Sep 27, 2017

Hi,
As chrissnow pointed out the board does not have CMSIS-DAP with mass storage enabled. I assume the test scripts try to program the board this way. Not sure if there is an alternative way the scripts could use.

I was able to program the NXP board using jtag and run tests using the mbedhtrun. These were two tests only - mbedtls multi and events timing. They passed. It will be painful to run all the tests that way.
Do you want me to paste the console output of the two tests here?

@0xc0170 0xc0170 added the needs: CLA label Sep 28, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 28, 2017

Can you split this PR to 2 parts , one would be:
Update of the SAMR21 Xplained Pro board support to mbed OS 5. The blinky example was build with IAR and GCC_ARM. Other components were not tested ?

You can keep here LPC addition.

Can you then sign please https://os.mbed.com/contributor_agreement/

@grygorek grygorek changed the title from LPC1769 port & SAMR21 update to LPC1769 port Sep 28, 2017

@grygorek

This comment has been minimized.

Contributor

grygorek commented Sep 28, 2017

I have reverted the SAM commit. Ill keep it as a separate branch for the moment.
Agreement signed already

I run the blinky example from GCC_ARM and IAR.
Also run two more tests from IAR

  • mbedtls multi
  • events timing
    Other components not tested.

@grygorek grygorek force-pushed the grygorek:master branch Sep 29, 2017

mbed LPC1768 & Xpresso LPC1769 unified
Target of LPC1769 links to mbed LPC1768.
The PinNames.h has conditional compile for the pin names.
LWIP lpc17xx emac driver modified to allow LPC1769 target

@grygorek grygorek force-pushed the grygorek:master branch to 728a3a4 Oct 2, 2017

@0xc0170 0xc0170 removed the needs: CLA label Oct 13, 2017

@@ -243,6 +243,17 @@
"features": ["LWIP"],
"device_name": "LPC1768"
},
"LPC1769": {
"inherits": ["LPCTarget"],

This comment has been minimized.

@0xc0170

0xc0170 Oct 13, 2017

Member

should this inherit from lpc1768 ? no extra label on the line 249 needed then?

I believe that is what @chrissnow was suggesting earlier?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 13, 2017

Thanks for signing CLA.

The only question is about inheritance (the relationship between lpc1768 and lpc1769). Otherwise this PR looks f ine

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 13, 2017

/morph build

@@ -0,0 +1,172 @@
/* Linker script for mbed LPC1769 */

This comment has been minimized.

@chrissnow

chrissnow Oct 13, 2017

Contributor

Is this file required? Should it not use the LPC1768 one? It looks like it may have come from the xbed port unnecessarily?

If it is required please can you update it to to include my recent changes to LPC1768 regarding CRP and bootloader as in #5038.

@chrissnow

This comment has been minimized.

Contributor

chrissnow commented Oct 17, 2017

@grygorek I think you made the same mistake I did here
#4640
You need to rebase rather than merge to fix the conflict.
@theotherjimmy helped me before, that link might explain things enough so you don't make things worse like I did!

@grygorek

This comment has been minimized.

Contributor

grygorek commented Oct 17, 2017

@chrissnow Thanks for warning ;-). The conflict is in the comment I have added to the linker file. I guess it will be easier if i revert that single change to avoid the conflict at all.

@grygorek grygorek force-pushed the grygorek:master branch to 728a3a4 Oct 17, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 18, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 18, 2017

Build : SUCCESS

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

Skipping test trigger, missing label 'NEED CI'

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 19, 2017

@chrissnow happy with this patch?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 23, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 23, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 23, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 23, 2017

Build : SUCCESS

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

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci

This comment has been minimized.

@adbridge adbridge merged commit 97e2d4a into ARMmbed:master Oct 26, 2017

5 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment