Skip to content

rtos: declare vector table type as in Technical Note 11578 #12696

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 1 commit into from
Apr 1, 2020

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Mar 25, 2020

Summary of changes

Most references I found for IAR, they use a pointer to an array . We need this for a pragma
later, thus we should use the same type.

Found in #12547

@amq @stevew817

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 25, 2020

Note, I don't have valid license locally to test this 😞

@ciarmcom ciarmcom requested review from a team March 25, 2020 12:00
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@evedon
Copy link
Contributor

evedon commented Mar 26, 2020

Note, I don't have valid license locally to test this 😞

This PR should be on hold until you can test it.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 26, 2020

I would not mind waiting but another PR is blocked on this unfortunately.

@stevew817 would you be able to help testing this PR with #12547 ? To get 12547 in.

@stevew817
Copy link
Contributor

@0xc0170 I don't have an IAR license checked out either :(

adbridge
adbridge previously approved these changes Mar 26, 2020
Following IAR guide for RAM vector table, this is in the code snippet there:

```
extern void * __vector_RAM_table [];
void main(void)
```

Found in ARMmbed#12547
@0xc0170 0xc0170 force-pushed the fix_boot_iar_vector branch from 2996022 to 5cbf666 Compare March 30, 2020 12:38
@mergify mergify bot dismissed adbridge’s stale review March 30, 2020 12:38

Pull request has been modified.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 30, 2020

Updated the code, follows what is in https://www.iar.com/support/tech-notes/general/execute-in-ram-after-copying-from-flashrom-v5.20-and-later/. This should fix the error we have seen.

I got license sorted out, compiled fine for tests.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 30, 2020

Please review, and its ready for CI 💯

@0xc0170 0xc0170 requested a review from adbridge March 30, 2020 12:54
@kjbracey
Copy link
Contributor

Why does this matter? You're not doing anything with it via the C language, so I can't see how the type matters. You're just getting a symbol reference, right?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 30, 2020

Correct, there is #12547 (comment) but that PR needs an update (it contains invalid type declaration).

I can close this PR.

@kjbracey
Copy link
Contributor

Oh, is it a type mismatch versus a different extern declaration someone is adding in a public header?

I'm tempted to question why they're adding that definition to a public header. As it's not really a C structure, the C typing of it is debatable, and different people might want to use a different type. There are pros and cons depending what you're doing. Putting it in a header forces everyone to use the same type, and triggers conflict.

Depends what the code source is. If they have "authority" on the type/platform, maybe?

Although the void * here is almost certainly not a useful type - this is a definite improvement, at least.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 30, 2020

Yes, I updated the PR with the comment, I missed previously they redeclare it in the header file that gets in the includes.

I keep this as it is, follows IAR guide so just an improvement, not a "fix" as stated previously.

@0xc0170 0xc0170 changed the title rtos: fix iar vector table type rtos: declare vector table type as in Technical Note 11578 Mar 30, 2020
@mergify mergify bot added needs: CI and removed needs: review labels Mar 31, 2020
@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 31, 2020

Ci started

@mbed-ci
Copy link

mbed-ci commented Mar 31, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 1
Build artifacts

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

Successfully merging this pull request may close these issues.

7 participants