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

update for vxWorks #1

Merged
merged 1 commit into from
Aug 15, 2019
Merged

update for vxWorks #1

merged 1 commit into from
Aug 15, 2019

Conversation

BaoshanPang
Copy link

  1. support crt-static
  2. change armv7_wrs_vxworks to armv7_wrs_vxworks_eabihf.
  3. code cleanup

@@ -20,7 +20,6 @@ pub fn target() -> TargetResult {
options: TargetOptions {
// feature msync would disable instruction 'fsync' which is not supported by fsl_p1p2
features: "+secure-plt,+msync".to_string(),
target_mcount: "_mcount".to_string(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

"mcount" (or the name we specify here) is the function called by compiler generated instrumentation code when profiling is enabled.

https://www.kernel.org/doc/Documentation/trace/ftrace-design.txt
https://ftp.gnu.org/pub/old-gnu/Manuals/gprof-2.9.1/html_node/gprof_25.html

VxWorks would need to implement this function (we don't currently have it). Removing this code doesn't actually disable calls to mcount, it just reverts to the default name "mcount".

For clarity I suggest adding a line to vxworks_base.rs:

target_mcount: "_mcount".to_string(), // VxWorks needs to implement this to support profiling

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@@ -20,7 +20,6 @@ pub fn target() -> TargetResult {
options: TargetOptions {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move the following common settings from the target specific files to vxworks_base.rs:

  • target_os
  • target_vendor
  • linker_flavor

Copy link
Author

Choose a reason for hiding this comment

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

Done. I also moved target_env to vxworks_base as they are all "gnu".

Copy link
Author

Choose a reason for hiding this comment

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

Actually I need to revert the change here. The vxworks_base.rs suppose to hold all "options", but
they doesn't belong to "options".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually I need to revert the change here
OK that's unfortunate.

@BaoshanPang BaoshanPang force-pushed the vxworks_bpang_static branch 4 times, most recently from 29bac87 to 1146ea8 Compare August 13, 2019 21:02
2. change armv7_wrs_vxworks to armv7_wrs_vxworks_eabihf.
3. use wr-** instead of vx-**
4. set PIE to false
5. code cleanup
@BaoshanPang
Copy link
Author

cc @bpangWR

self.compose_and_run(
vx_run,
wr_run,
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is vx-run (or wr-run)?

Copy link
Author

Choose a reason for hiding this comment

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

This is the script I used to run test case on board(Simics, Vxsim or real board).

@BaoshanPang BaoshanPang merged commit 403e672 into master Aug 15, 2019
BaoshanPang pushed a commit that referenced this pull request Sep 2, 2019
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.

3 participants