-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
BaoshanPang
commented
Aug 12, 2019
- support crt-static
- change armv7_wrs_vxworks to armv7_wrs_vxworks_eabihf.
- 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(), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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.
29bac87
to
1146ea8
Compare
2. change armv7_wrs_vxworks to armv7_wrs_vxworks_eabihf. 3. use wr-** instead of vx-** 4. set PIE to false 5. code cleanup
1146ea8
to
f161efa
Compare
cc @bpangWR |
self.compose_and_run( | ||
vx_run, | ||
wr_run, |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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).