Skip to content
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

Porting to ARM Ertec with eCos #6113

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Isarhamster
Copy link

Porting to eCos with GCC C89 compiler
Generate symbolic defines so that the application does not have to use magic numbers

@CLAassistant
Copy link

CLAassistant commented Nov 7, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@jpfr jpfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Please make this PR against the 1.3 branch.
From there we will forward-port to the 1.4 branch and then to master.

@@ -134,8 +135,19 @@ def writeh(line):

def writec(line):
print(unicode(line), end='\n', file=outfilec)

def parentNodeString(node,L):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified

    def parentNodeString(node,L):
        if node is None or node.parent is None:
            return ""
        return str(parentNodeString(node.parent,L)) + "_" + str(node.displayName).upper()

@@ -24,9 +25,12 @@ UA_Int64 UA_DateTime_localTimeUtcOffset(void){
return (UA_Int64) (difftime(rawtime, gmt) * UA_DATETIME_SEC);
}

#define TICKS_TO_MS(Ticks) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file only exists in the 1.3 branch and before.

We refactored quite a lot of the architecture integration API.
We will bring this back when we can.
But we didn't have the tooling to compile against eCos during the time when the API was revised.

@@ -50,6 +50,7 @@ connection_releaserecvbuffer(UA_Connection *connection,
UA_ByteString_clear(buf);
}

#ifdef poll
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it possible to disable the poll bits of the function by ifdef's, so that only 3 + 4 lines are disabled instead of completely duplicating the function?

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_TRACE(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
static UA_INLINE UA_FORMAT(4,5) void
UA_LOG_TRACE2(const UA_Logger *logger, UA_LogCategory category, unsigned int line, const char *msg, ...) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When adding an argument here, you should probably also add (void) line; in case UA_LOGLEVEL > 100. Ditto for the functions below.

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.

None yet

4 participants