Skip to content

IAR support for ethernet library #948

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 2 commits into from
Mar 6, 2015
Merged

IAR support for ethernet library #948

merged 2 commits into from
Mar 6, 2015

Conversation

GustavWi
Copy link
Contributor

@GustavWi GustavWi commented Mar 4, 2015

No description provided.

@@ -427,7 +427,11 @@ sys_thread_t sys_thread_new(const char *pcName,
t->def.tpriority = (osPriority)priority;
t->def.stacksize = stacksize;
#ifndef __MBED_CMSIS_RTOS_CA9
#if defined (__ICCARM__)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this fix for , why for IAR is a pointer to 32bit , otherwise to 8 bit?

@GustavWi
Copy link
Contributor Author

GustavWi commented Mar 5, 2015

#if defined (__ICCARM__)
t->def.stack_pointer = (uint32_t*)malloc(stacksize);
#else
t->def.stack_pointer = (unsigned char*)malloc(stacksize);
 #endif

t->def.stack_pointer is of type uint32_t *. In GCC assigning pointer of a different type generates a warning. IAR's compiler does not allow it and generates an error. I had to correct it so IAR can compile the code.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 5, 2015

Means , that GCC generators warning and we should fix that

@GustavWi
Copy link
Contributor Author

GustavWi commented Mar 5, 2015

Ok I did not want to change any of your code. So should I make a 2nd commit?
Replacing:

#if defined (__ICCARM__)
t->def.stack_pointer = (uint32_t*)malloc(stacksize);
#else
t->def.stack_pointer = (unsigned char*)malloc(stacksize);
#endif

With:

t->def.stack_pointer = (uint32_t*)malloc(stacksize);

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 5, 2015

Yes, it was changed in the declaration of stack pointer but not in ethernet.

0xc0170 added a commit that referenced this pull request Mar 6, 2015
IAR support for ethernet library
@0xc0170 0xc0170 merged commit ed57ce8 into ARMmbed:master Mar 6, 2015
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.

2 participants