Skip to content

Corrected STM+K64F eth driver flagging, memory allocation and thread init #6266

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

Merged
merged 3 commits into from
Mar 12, 2018

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Mar 5, 2018

Description

Changed STM EMAC ethernet driver RX memory allocation back to pool allocation. It was changed to heap during early phases of EMAC development when pool buffers were not yet implemented. Added check to RX callback function to check if RX thread has already been created.

Changed STM+K64F driver enable flags from LWIP ethernet enabled and DEVICE_EMAC flags to use flags from target headers.

Extension of and replacement for #6241.

Pull request type

  • Fix
  • Refactor
  • New Target
  • Feature

Mika Leppänen and others added 2 commits March 1, 2018 09:08
Checking DEVICE_EMAC is problematic - particularly for the Odin W2 where
apps have been shutting this off to disable the Wi-fi interface.

Make drivers check a locally-relevant flag instead, pending new
thoughts on how to achieve application/test-relevant flagging for
XXX:get_default_instance() being provided by a system.

However that is achieved, drivers do require a flag set purely by the
target - they mustn't be tripped up by an add-on module providing itself
as the system's default EMAC.
@kjbracey
Copy link
Contributor Author

kjbracey commented Mar 5, 2018

If we go with this version, I believe we should be able to revert https://github.com/ARMmbed/mbed-os-cliapp/pull/388 - the part that disables Odin W2, anyway. An IPv6 enable got slipped into the same commit.

@kjbracey
Copy link
Contributor Author

kjbracey commented Mar 5, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 5, 2018

Build : FAILURE

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

Just checking "does the chip have an EMAC" doesn't work - there are
targets using those chips which do not have an Ethernet connector and
don't provide the necessary surrounding infrastructure (eg DISCO_F429ZI,
not providing the board emac config call, and HEXIWEAR not providing PHY
info).

Make the targets that actually do want EMAC define their own local
Freescale_EMAC and STM_EMAC labels, and move the drivers into
the corresponding TARGET_ directories, removing the #ifdefs.
@kjbracey
Copy link
Contributor Author

kjbracey commented Mar 5, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 5, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Mar 5, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 5, 2018

@kjbracey kjbracey requested review from SeppoTakalo and 0xc0170 March 6, 2018 11:40
@kjbracey
Copy link
Contributor Author

kjbracey commented Mar 6, 2018

Just wondering if anyone has any problems with that use of the extra_labels mechanism, or if this is the intended use.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2018

@kjbracey kjbracey merged commit 1cc95f6 into ARMmbed:feature-emac Mar 12, 2018
@sg- sg- removed the needs: CI label Mar 12, 2018
@kjbracey kjbracey deleted the emac_stm_corr branch March 12, 2018 08:31
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.

7 participants