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

Controlling memory location of od data #256

Open
wants to merge 2 commits into
base: xdd
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libEDSsharp/CanOpenNodeExporter_V4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,10 @@ OD data declaration of all groups
{
if (ODStorage_t.Count > 0)
{
file.WriteLine($"extern {odname}_{group}_t {odname}_{group};");
file.WriteLine($"extern ATTRIBUTE_{group} {odname}_{group}_t {odname}_{group};");
}
}
file.WriteLine($"extern OD_t *{odname};");
file.WriteLine($"extern ATTRIBUTE_OD OD_t *{odname};");

file.WriteLine(string.Format(@"

Expand Down Expand Up @@ -493,7 +493,7 @@ OD data initialization of all groups
{
if (ODStorage.Count > 0)
{
file.WriteLine($"{odname}_{group}_t {odname}_{group} = {{");
file.WriteLine($"ATTRIBUTE_{group} {odname}_{group}_t {odname}_{group} = {{");
file.WriteLine($" {string.Join(",\n ", ODStorage[group])}");
file.WriteLine($"}};\n");
}
Expand Down Expand Up @@ -521,7 +521,7 @@ typedef struct {{
/*******************************************************************************
Object dictionary
*******************************************************************************/
static OD_entry_t {0}List[] = {{
static ATTRIBUTE_OD OD_entry_t {0}List[] = {{
{1},
{{0x0000, 0x00, 0, NULL, NULL}}
}};
Expand Down