Skip to content

CELLULAR can't compile is DEVICE_SERIAL is not enabled #9848

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

Closed
jeromecoutant opened this issue Feb 26, 2019 · 13 comments
Closed

CELLULAR can't compile is DEVICE_SERIAL is not enabled #9848

jeromecoutant opened this issue Feb 26, 2019 · 13 comments

Comments

@jeromecoutant
Copy link
Collaborator

jeromecoutant commented Feb 26, 2019

Description

How to reproduce: remove SERIAL from DEVICE_HAS in targets json file, and compile a target (with no cellular):

[Error] CellularDevice.h@197,0:  #20: identifier "UARTSerial" is undefined
[Error] CellularContext.h@269,0:  #20: identifier "UARTSerial" is undefined
[Error] AT_CellularContext.h@61,0:  #20: identifier "UARTSerial" is undefined
[Error] AT_CellularContext.cpp@92,0:  #20: identifier "UARTSerial" is undefined
[Error] AT_CellularContext.cpp@105,0:  #20: identifier "UARTSerial" is undefined

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug
@jeromecoutant
Copy link
Collaborator Author

Even with .mbedignore fiel with:

*cellular*
*greentea*
*utest*
*unity*

We got link error:

[DEBUG] Errors: Error: L6218E: Undefined symbol CellularInterface::get_target_default_instance() (referred from BUILD/NUCLEO_L476RG/ARM/features/netsocket/NetworkInterfaceDefaults.o)

@SeppoTakalo

@SeppoTakalo
Copy link
Contributor

@AriParkkila This needs to go into Cellular teams backlog.

Those files needs probably #if DEVICE_SERIAL to protect the build.

@jeromecoutant
Copy link
Collaborator Author

#if (DEVICE_SERIAL && DEVICE_INTERRUPTIN) || defined(DOXYGEN_ONLY)

Seems that we need to protect also with DEVICE_INTERRUPTIN

Thx

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-925

@jeromecoutant
Copy link
Collaborator Author

Hi

Note that this issue is raised during TFM scope. (#9221) (#9853)

cc @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-psa

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2019

@ARMmbed/mbed-os-wan

@jeromecoutant
Copy link
Collaborator Author

Bump

Thx

@AriParkkila
Copy link

@jeromecoutant Can you refer to an Mbed target that does not support DEVICE_SERIAL so I could try with that?

It seems to me that Mbed OS actually requires DEVICE_SERIAL, for example Greentea:

Compile [ 15.7%]: greentea_serial.cpp
[ERROR] In file included from ./features/frameworks/greentea-client/source/greentea_serial.cpp:1:
./features/frameworks/greentea-client/greentea-client/greentea_serial.h:10:37: error: expected class name
class GreenteaSerial : public mbed::RawSerial {
                                    ^
./features/frameworks/greentea-client/source/greentea_serial.cpp:15:42: error: member initializer 'RawSerial' does not name a non-static data member or base class

@jeromecoutant
Copy link
Collaborator Author

Hi

Can you refer to an Mbed target that does not support DEVICE_SERIAL so I could try with that?

This question is related to TFM integration.
Idea is to create a new secure target which doesn't need SERIAL API.

It seems to me that Mbed OS actually requires DEVICE_SERIAL, for example Greentea

Yes, I raised #9850 :-)

@AriParkkila
Copy link

@jeromecoutant #10029 fixes cellular dependencies to DEVICE_SERIAL.

Could you create an issue for UARTSerial.h / DEVICE_INTERRUPTIN to be fixed separately.

@kjbracey
Copy link
Contributor

I believe Jerome's point in the comment above was that your compile condition needs to match UARTSerial's availability condition - ie it has to be DEVICE_SERIAL && DEVICE_INTERRUPTIN.

Although that condition is itself rather strange - it's only the DCD line that it needs InterruptIn in for, so maybe it would be better if UARTSerial only made that DCD functionality conditional.

@AriParkkila
Copy link

DEVICE_INTERRUPTIN might be needed in any case? For example K64F target has compile errors without DEVICE_INTERRUPTIN:

[Error] NanostackRfPhyMcr20a.h@64,11: 'InterruptIn' in namespace 'mbed' does not name a type

@AriParkkila
Copy link

@jeromecoutant can we close this issue? PR #10029 was merged.

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

No branches or pull requests

6 participants