mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-24 23:57:34 +08:00
Compare commits
495 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a37a589f15 | |||
| 0aa14deb5d | |||
| 62546350f1 | |||
| fa976f84b1 | |||
| f41c294028 | |||
| b824f33ae9 | |||
| a99ddd0845 | |||
| 8d74e52bb7 | |||
| 9c0c85c9e2 | |||
| 41cc73e555 | |||
| a51d47f8e8 | |||
| e45b862f1d | |||
| d87cd171f4 | |||
| 7ddcb7fe3c | |||
| 982692f5ed | |||
| f08a22934e | |||
| f0d8d53da6 | |||
| 3fcd323f6a | |||
| 9d3e18dbe1 | |||
| a67e66000e | |||
| 4741ec25ce | |||
| 5ac5399d83 | |||
| 055c9db178 | |||
| 15096ead5f | |||
| bec9eef5b0 | |||
| 11556d4e9a | |||
| 933d31b476 | |||
| 6ee8f7be0f | |||
| d83033f449 | |||
| 0d4f481035 | |||
| d068ae48d6 | |||
| b3e9904df0 | |||
| 09e62f96b2 | |||
| caed8e4b05 | |||
| ab0e3b6001 | |||
| d79229f958 | |||
| aa60d76963 | |||
| 6b356068cb | |||
| 9cedb169fc | |||
| 74cc1d901d | |||
| 0dee7af81f | |||
| a264541861 | |||
| 0c5f2d3b8c | |||
| 9fb53d4276 | |||
| 084a992572 | |||
| 79f7986715 | |||
| 39909128ec | |||
| d3a23cee40 | |||
| 6d5f12d2a2 | |||
| ac2b38603c | |||
| 0cc79f3e48 | |||
| d6ee15596d | |||
| 40462bfc1f | |||
| 145e7387fb | |||
| 773d81f208 | |||
| f2fad6d966 | |||
| 320b414511 | |||
| 63571b3e3f | |||
| 323ce797f8 | |||
| 578e426e9e | |||
| 155d3c7d36 | |||
| b1829e5766 | |||
| 76a8617529 | |||
| b2742658b7 | |||
| 1c3f30be01 | |||
| 14ec7a0d93 | |||
| 074ed24d02 | |||
| 500c45e798 | |||
| a728431e43 | |||
| b399b8d5ea | |||
| 61f80c087a | |||
| 18960f0b82 | |||
| 9377b02c58 | |||
| 05bdef867d | |||
| 028ae9561d | |||
| eea1477e80 | |||
| 37d93320eb | |||
| 026d36dee8 | |||
| fd68fd2933 | |||
| f3624c172c | |||
| 93c37e4e0c | |||
| 8d078eb02e | |||
| bec5d6de9b | |||
| 350e43f02c | |||
| 77082188d8 | |||
| d73f842151 | |||
| 274c55a4ae | |||
| 65d026d45c | |||
| 5faa116681 | |||
| 3b725e5525 | |||
| 07fbf8681d | |||
| 85f4f13e8a | |||
| 9a423e222b | |||
| ed474794cc | |||
| a3593d7d07 | |||
| 9c87766021 | |||
| 4bc7f1f3f3 | |||
| f50b238c78 | |||
| b4ebc68a40 | |||
| ff2748ba53 | |||
| 42e51b0215 | |||
| 17502da493 | |||
| 42e4ea86b1 | |||
| 616401190c | |||
| 71f3a02c65 | |||
| a07390a2d7 | |||
| 2af9934f1c | |||
| 4ecda97fc1 | |||
| 4aa7bff8c6 | |||
| e7406bbd46 | |||
| 3747d0bc80 | |||
| 9443dd6345 | |||
| bd511e1074 | |||
| 810e9e174f | |||
| c12a3330b8 | |||
| 7b2a1d4742 | |||
| b6435bb7f2 | |||
| 3a0770499a | |||
| 05007944f1 | |||
| 824dbce941 | |||
| 6e5a86b6fe | |||
| dc23c85085 | |||
| 1b80018f30 | |||
| 62fd132047 | |||
| 84dd8839a2 | |||
| 64db89ab20 | |||
| dddd2c3297 | |||
| e828ba4288 | |||
| b550ad22b9 | |||
| 8415692f2a | |||
| 749f213ca5 | |||
| c4d54d983b | |||
| 0c303f03f4 | |||
| d6f69ef2a0 | |||
| 0f47ae8e7b | |||
| 9c8e95db8d | |||
| 5b9201e5b4 | |||
| e0fab172a4 | |||
| 615e1f3e29 | |||
| 468aea9409 | |||
| 8c4b900f9a | |||
| ca86416ce6 | |||
| 6bc09138c1 | |||
| 8be1034346 | |||
| 514845592b | |||
| 17ea92bb54 | |||
| 328c5cb1cf | |||
| 9f87702074 | |||
| 665d2ea74e | |||
| f9201811b4 | |||
| 0931ff10d5 | |||
| 73ef22ae77 | |||
| 251f1a069b | |||
| 841914462d | |||
| 47b9016f5e | |||
| c61c1a15ee | |||
| 8b1d2b8551 | |||
| 00229c4fd2 | |||
| 578c003c13 | |||
| ed62ae0e4f | |||
| 446598d003 | |||
| 4f850c7cd0 | |||
| 2ccd86102b | |||
| 66dbc1e25f | |||
| fd2161b6bf | |||
| 1ab7943940 | |||
| 4f8f1a5f7e | |||
| d31a45a62d | |||
| faabe2d431 | |||
| 6fb1ba7583 | |||
| 70050ae4f5 | |||
| 9756c70491 | |||
| 470c3cfa6e | |||
| 98fb373590 | |||
| ad9288536b | |||
| f6de99d42e | |||
| 3d87bfcc0a | |||
| 19449a4e75 | |||
| a5cc449e69 | |||
| 4b7416c05b | |||
| 861e15be4c | |||
| 8ad0f36f48 | |||
| db1657fa84 | |||
| 60235f8474 | |||
| 00cc1323ea | |||
| 3e9b295c22 | |||
| 284375efc3 | |||
| 697d713faf | |||
| c6d5bd868e | |||
| 5672af4299 | |||
| 1b67187770 | |||
| ab23a44b99 | |||
| 5f775b508f | |||
| 32e92ba817 | |||
| dfa5964719 | |||
| d430e13401 | |||
| 438b0abc7a | |||
| 9661eddef8 | |||
| e52c0ceca5 | |||
| b06b46b224 | |||
| 806b462935 | |||
| 5831494164 | |||
| 90e106ede3 | |||
| 5493d96d17 | |||
| 2a792ca201 | |||
| 3269ee8df1 | |||
| 561cfca4f9 | |||
| f25a70a674 | |||
| 055b5404c3 | |||
| 3340fca332 | |||
| a5979e16be | |||
| 0b9e4a5902 | |||
| cf5e6e4133 | |||
| 973068ebfe | |||
| 51f738e54c | |||
| e25cfaaa2f | |||
| 34de392425 | |||
| 935253357a | |||
| 12f33524fa | |||
| ed0b5a7c1a | |||
| 0de0709be3 | |||
| 1da4e2f441 | |||
| 4b42a1639b | |||
| f9fe0e3746 | |||
| ad534561d3 | |||
| af71b2e3ab | |||
| 675a5a2b2c | |||
| 071eaef884 | |||
| 64d264b49a | |||
| 3e18fa12d6 | |||
| 2feb096fb9 | |||
| b264577daa | |||
| 22838f491a | |||
| 187297653a | |||
| 0fc98b2793 | |||
| e18b1c0355 | |||
| 6549017993 | |||
| 8327335fa4 | |||
| a6148d6320 | |||
| 142d6f3dbc | |||
| 68e386cf2d | |||
| 61e972ba35 | |||
| 518222bae4 | |||
| 90a33d59e4 | |||
| 4ccc60e2b0 | |||
| b7890529b2 | |||
| 9969edfabc | |||
| 1f40a65210 | |||
| 4bb53e2afc | |||
| ffe9f8a942 | |||
| 10f33cdd35 | |||
| e498023d0f | |||
| 4acc18ca60 | |||
| 820a442fe3 | |||
| eee08601af | |||
| db3c89b1e3 | |||
| 319cab6c2c | |||
| c3884b5bc1 | |||
| 39c90c8fc9 | |||
| 87b861d0f0 | |||
| 60a083b662 | |||
| 3a3cc33d69 | |||
| 9d54b7b64e | |||
| 093854d29b | |||
| 723e803ab9 | |||
| 904f827df0 | |||
| 4a93f7cea1 | |||
| e4f235001b | |||
| ecf2cd3afb | |||
| 1ad25369e7 | |||
| 5114158090 | |||
| 9fbbcc9c73 | |||
| 2a84afb6a2 | |||
| 9e352e92bd | |||
| 5f14ee2a97 | |||
| ad0482155e | |||
| d300a879f1 | |||
| e77b4418a5 | |||
| 05a2d4d5a9 | |||
| d9e31d67aa | |||
| b7e563bdbe | |||
| 596da5b7d3 | |||
| 2f73115b54 | |||
| bf311ed77d | |||
| 63a53d48e7 | |||
| c8ec6b3d08 | |||
| 3b27864e53 | |||
| 3ac8c23dd0 | |||
| 6215e6c7ec | |||
| e87a6c755d | |||
| 69e0c2fc10 | |||
| e4ee7c7d98 | |||
| 541697d193 | |||
| c49c8932de | |||
| 0c926250a2 | |||
| dfb4ec56b1 | |||
| f15eefcc95 | |||
| 29730e30fa | |||
| ac97b5520c | |||
| 648a21f11d | |||
| d3fd03a014 | |||
| b1e0702657 | |||
| 8d82560308 | |||
| e265ebabc5 | |||
| 9419f9c5e8 | |||
| 08dab18a8b | |||
| 099c2d13f6 | |||
| 177ee4cbca | |||
| b1ebd16c61 | |||
| d1d5eba320 | |||
| 48f3bd4078 | |||
| 5f19eeaaa5 | |||
| 2d6bc9b6e0 | |||
| 5d9b3504f7 | |||
| f1fca0939f | |||
| 3702140e24 | |||
| 3d166d3279 | |||
| 19fa5cfe25 | |||
| baa37c1143 | |||
| 0385245ae1 | |||
| 1f61dcfb06 | |||
| 3779ff3690 | |||
| 21cf26a69f | |||
| a654c37306 | |||
| 07e38563ba | |||
| d5b60f7002 | |||
| 923af2c65b | |||
| 2d3800fa25 | |||
| 4f8c1ccfe8 | |||
| 7dd57d55f6 | |||
| 69bf437e9a | |||
| 633fbe147a | |||
| 118839e75c | |||
| 3f5a0e49a4 | |||
| 86360d076c | |||
| 3820f761b1 | |||
| 50d3af1ba1 | |||
| 867aa9d4bc | |||
| 310d166899 | |||
| 9c761d9ae5 | |||
| b3b74eaaf6 | |||
| 4c8dca738c | |||
| 4da1ec1146 | |||
| 1a5741f984 | |||
| 4d4d8ed887 | |||
| eae01a06e7 | |||
| d6a54910b4 | |||
| 362db92515 | |||
| dd4ffb3c0c | |||
| 44cdc52ef8 | |||
| dcbfc9de2d | |||
| 9a085126fd | |||
| ac6e7a1c6c | |||
| 532f370e7d | |||
| 62dc926891 | |||
| c1d3be4258 | |||
| 68a9e981b1 | |||
| f5b6656a6c | |||
| 3b7ce61901 | |||
| 3ec40a5956 | |||
| 24c2967511 | |||
| ee87257a8d | |||
| c28533677d | |||
| 2e292abfff | |||
| 269ce07cb5 | |||
| 3348869ae1 | |||
| 04b7ee43bc | |||
| 4e69952ee4 | |||
| cd4378b8c6 | |||
| ab10e68a40 | |||
| bf9758247b | |||
| d3ddbe8db5 | |||
| ecc5154a44 | |||
| cd2aceb363 | |||
| 2c6b3eeb02 | |||
| 5579a1d789 | |||
| 3c4b0c1b8c | |||
| fa9fdce6e6 | |||
| e78a4287f9 | |||
| 3b24abaa1b | |||
| feebb24106 | |||
| 783a780207 | |||
| abee13df1a | |||
| d96ba2d88a | |||
| e9a1599355 | |||
| aa0752ad86 | |||
| 5784f1d951 | |||
| 370d9ee409 | |||
| 4498509426 | |||
| 71bd35fcaa | |||
| 6ae23e7b7b | |||
| cfcc074e9d | |||
| b4e0a8396e | |||
| 5ec5a12f5e | |||
| 18dc0e4900 | |||
| 6e2343a485 | |||
| 514d4fd57b | |||
| 32d354e5fe | |||
| 92dc1a71a6 | |||
| 165420598e | |||
| 8ef10c9b38 | |||
| 199db72d5f | |||
| 4eb758edf0 | |||
| 759a60ac82 | |||
| dd0465070c | |||
| 186bc2bda4 | |||
| d2a118ee86 | |||
| 92344b96b3 | |||
| 4f52c0b6da | |||
| f16913c175 | |||
| e7fcfbf658 | |||
| 43fccece61 | |||
| 14e51098e5 | |||
| 7384bd2675 | |||
| 64688b04d8 | |||
| 96bc58f0eb | |||
| 4f098a01bc | |||
| 9980d2a556 | |||
| 757f1df068 | |||
| d62204856c | |||
| b898aabfed | |||
| b2d73dca26 | |||
| 925213db8f | |||
| 38c1ec6a9c | |||
| 0a98c5a7f4 | |||
| 1a89f165fd | |||
| 171c26373b | |||
| f6a34e1e80 | |||
| cbf34109d1 | |||
| c266c3e43a | |||
| 3664d9e4ce | |||
| cc81c7d49e | |||
| 6e9e503ee6 | |||
| 8478d1ea37 | |||
| ed0fa99198 | |||
| 59b70a881d | |||
| 5416679735 | |||
| 6df299738e | |||
| 9e2375ab91 | |||
| 5e75f17680 | |||
| fee4728b1f | |||
| c71a228f15 | |||
| 112fc5c9cd | |||
| 51f527d845 | |||
| 1730cd1971 | |||
| d631a5d39f | |||
| bff99f9794 | |||
| 371fa98579 | |||
| 1c624d20f5 | |||
| 789d91900d | |||
| f9d8c613b0 | |||
| 8b3aa46c01 | |||
| 1804cea92c | |||
| 02a4d93c74 | |||
| 399815469f | |||
| 5e7ebbe47c | |||
| 45ada2dd4c | |||
| 4865d027f9 | |||
| 29e07b1e52 | |||
| ff67da1bb4 | |||
| 3d8a35288e | |||
| 38bc46fd1a | |||
| 3b72f3b641 | |||
| 3dad16bc40 | |||
| 42108eb4af | |||
| 76e15b4a21 | |||
| 2492fb35e4 | |||
| 96c7fe4978 | |||
| 5c4582ccce | |||
| bd4839e855 | |||
| 2219e096d7 | |||
| 592dc65bae | |||
| b99e597a73 | |||
| 58b40fbbb9 | |||
| 047fb13922 | |||
| 7053919a9f | |||
| 2d15c96b9b | |||
| 6a4c589c62 | |||
| bf09089a26 | |||
| 6bc11596fe | |||
| aa22407d87 | |||
| a07bccc046 | |||
| f44f497e3f | |||
| edc445a1b2 | |||
| b9e0a16594 | |||
| 991c07eef9 | |||
| 3a004ffd68 | |||
| 5f6b8fcb9f | |||
| f0f16b9cc5 | |||
| faaee0f077 | |||
| 18f17dcb96 | |||
| 381c97d3c6 | |||
| 8acdb8ca3f | |||
| 45b9e18195 | |||
| 96d0755afd |
+9
-13
@@ -9,10 +9,10 @@ pipeline {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2021-02-04",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-02-04",
|
||||
base: "px4io/px4-dev-base-bionic:2021-02-04",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-02-04",
|
||||
armhf: "px4io/px4-dev-armhf:2021-04-29",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-04-29",
|
||||
base: "px4io/px4-dev-base-bionic:2021-04-29",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-04-29",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||
]
|
||||
|
||||
@@ -45,21 +45,19 @@ pipeline {
|
||||
"cuav_can-gps-v1_canbootloader",
|
||||
"cuav_can-gps-v1_default",
|
||||
"cuav_nora_default",
|
||||
"cuav_nora_test",
|
||||
"cuav_x7pro_default",
|
||||
"cuav_x7pro_test",
|
||||
"cubepilot_cubeorange_console",
|
||||
"cubepilot_cubeorange_default",
|
||||
"cubepilot_cubeyellow_console",
|
||||
"cubepilot_cubeyellow_default",
|
||||
"freefly_can-rtk-gps_canbootloader",
|
||||
"freefly_can-rtk-gps_default",
|
||||
"holybro_can-gps-v1_canbootloader",
|
||||
"holybro_can-gps-v1_default",
|
||||
"holybro_durandal-v1_default",
|
||||
"holybro_durandal-v1_test",
|
||||
"holybro_kakutef7_default",
|
||||
"holybro_pix32v5_default",
|
||||
"modalai_fc-v1_default",
|
||||
"modalai_fc-v1_rtps",
|
||||
"modalai_fc-v2_default",
|
||||
"mro_ctrl-zero-f7_default",
|
||||
"mro_ctrl-zero-f7-oem_default",
|
||||
"mro_ctrl-zero-h7_default",
|
||||
@@ -81,7 +79,6 @@ pipeline {
|
||||
"px4_fmu-v2_fixedwing",
|
||||
"px4_fmu-v2_multicopter",
|
||||
"px4_fmu-v2_rover",
|
||||
"px4_fmu-v2_test",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_cannode",
|
||||
"px4_fmu-v4_default",
|
||||
@@ -100,7 +97,6 @@ pipeline {
|
||||
"px4_fmu-v5x_base_phy_DP83848C",
|
||||
"px4_fmu-v5x_default",
|
||||
"px4_fmu-v6u_default",
|
||||
"px4_fmu-v6u_test",
|
||||
"px4_fmu-v6x_default",
|
||||
"px4_io-v2_default",
|
||||
"spracing_h7extreme_default",
|
||||
@@ -137,7 +133,7 @@ pipeline {
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
@@ -162,7 +158,7 @@ pipeline {
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '5', artifactDaysToKeepStr: '14'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+67
-155
@@ -7,12 +7,12 @@ pipeline {
|
||||
|
||||
parallel {
|
||||
|
||||
stage("cubepilot_cubeorange_console") {
|
||||
stage("cubepilot_cubeorange_test") {
|
||||
stages {
|
||||
stage("build cubepilot_cubeorange_console") {
|
||||
stage("build cubepilot_cubeorange_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -22,10 +22,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make cubepilot_cubeorange_console'
|
||||
sh 'make cubepilot_cubeorange_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'cubepilot_cubeorange_console'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'cubepilot_cubeorange_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -42,9 +42,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'cubepilot_cubeorange_console'
|
||||
unstash 'cubepilot_cubeorange_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_console/cubepilot_cubeorange_console.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -73,13 +73,10 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -89,7 +86,7 @@ pipeline {
|
||||
stage("build cuav_x7pro_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -149,75 +146,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
// stage("px4_fmu-v2_test") {
|
||||
// stages {
|
||||
// stage("build px4_fmu-v2_test") {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'export'
|
||||
// sh 'make distclean'
|
||||
// sh 'ccache -s'
|
||||
// sh 'git fetch --tags'
|
||||
// sh 'make px4_fmu-v2_test'
|
||||
// sh 'make sizes'
|
||||
// sh 'ccache -s'
|
||||
// stash includes: 'build/px4_fmu-v2_test/px4_fmu-v2_test.elf', name: 'px4_fmu-v2_test'
|
||||
// }
|
||||
// post {
|
||||
// always {
|
||||
// sh 'make distclean'
|
||||
// }
|
||||
// }
|
||||
// } // stage build
|
||||
// stage("test") {
|
||||
// agent {
|
||||
// label 'px4_fmu-v2'
|
||||
// }
|
||||
// stages {
|
||||
// stage("flash") {
|
||||
// steps {
|
||||
// sh 'export'
|
||||
// sh 'find /dev/serial'
|
||||
// unstash 'px4_fmu-v2_test'
|
||||
// // flash board and watch bootup
|
||||
// sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
// }
|
||||
// }
|
||||
// stage("reset") {
|
||||
// steps {
|
||||
// cleanupFTDI();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// options {
|
||||
// timeout(time: 90, unit: 'MINUTES')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
stage("px4_fmu-v3_default") {
|
||||
stage("px4_fmu-v3_test") {
|
||||
stages {
|
||||
stage("build px4_fmu-v3_default") {
|
||||
stage("build px4_fmu-v3_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -227,10 +169,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v3_default'
|
||||
sh 'make px4_fmu-v3_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v3_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v3_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -247,9 +189,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v3_default'
|
||||
unstash 'px4_fmu-v3_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_test/px4_fmu-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -277,23 +219,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
stage("px4_fmu-v4_default") {
|
||||
stage("px4_fmu-v4_test") {
|
||||
stages {
|
||||
stage("build px4_fmu-v4_default") {
|
||||
stage("build px4_fmu-v4_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -303,10 +242,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4_default'
|
||||
sh 'make px4_fmu-v4_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -323,9 +262,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4_default'
|
||||
unstash 'px4_fmu-v4_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -353,23 +292,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
stage("px4_fmu-v4pro_default") {
|
||||
stage("px4_fmu-v4pro_test") {
|
||||
stages {
|
||||
stage("build px4_fmu-v4pro_default") {
|
||||
stage("build px4_fmu-v4pro_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -379,10 +315,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4pro_default'
|
||||
sh 'make px4_fmu-v4pro_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4pro_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4pro_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -399,9 +335,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4pro_default'
|
||||
unstash 'px4_fmu-v4pro_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -429,23 +365,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
stage("px4_fmu-v5_default") {
|
||||
stage("px4_fmu-v5_test") {
|
||||
stages {
|
||||
stage("build px4_fmu-v5_default") {
|
||||
stage("build px4_fmu-v5_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -455,10 +388,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'make px4_fmu-v5_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v5_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v5_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -475,9 +408,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v5_default'
|
||||
unstash 'px4_fmu-v5_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -505,13 +438,10 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -521,7 +451,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_debug") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -585,13 +515,10 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -601,7 +528,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_optimized") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -661,13 +588,10 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -677,7 +601,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_stackcheck") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -741,23 +665,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
stage("modalai_fc-v1_default") {
|
||||
stage("modalai_fc-v1_test") {
|
||||
stages {
|
||||
stage("build modalai_fc-v1_default") {
|
||||
stage("build modalai_fc-v1_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -767,10 +688,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make modalai_fc-v1_default'
|
||||
sh 'make modalai_fc-v1_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -787,9 +708,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'modalai_fc-v1_default'
|
||||
unstash 'modalai_fc-v1_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_default/modalai_fc-v1_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -821,9 +742,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -833,7 +751,7 @@ pipeline {
|
||||
stage("build holybro_durandal-v1_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -894,23 +812,20 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
|
||||
stage("nxp_fmuk66-v3_default") {
|
||||
stage("nxp_fmuk66-v3_test") {
|
||||
stages {
|
||||
stage("build nxp_fmuk66-v3_default") {
|
||||
stage("build nxp_fmuk66-v3_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -920,10 +835,10 @@ pipeline {
|
||||
sh 'make distclean'
|
||||
sh 'ccache -s'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make nxp_fmuk66-v3_default'
|
||||
sh 'make nxp_fmuk66-v3_test'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'nxp_fmuk66-v3_default'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'nxp_fmuk66-v3_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -940,9 +855,9 @@ pipeline {
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'nxp_fmuk66-v3_default'
|
||||
unstash 'nxp_fmuk66-v3_test'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
}
|
||||
}
|
||||
stage("configure") {
|
||||
@@ -970,13 +885,10 @@ pipeline {
|
||||
}
|
||||
stage("reset") {
|
||||
steps {
|
||||
cleanupFTDI();
|
||||
cleanupFTDI()
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
} // stage test
|
||||
}
|
||||
}
|
||||
@@ -989,8 +901,8 @@ pipeline {
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '40'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '30', artifactDaysToKeepStr: '60'))
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/cpp
|
||||
{
|
||||
"name": "px4-dev-nuttx",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-02-04",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-04-29",
|
||||
|
||||
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||
|
||||
|
||||
@@ -23,12 +23,13 @@ jobs:
|
||||
"shellcheck_all",
|
||||
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
|
||||
"NO_NINJA_BUILD=1 px4_sitl_default",
|
||||
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
|
||||
"airframe_metadata",
|
||||
"module_documentation",
|
||||
"parameters_metadata",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
image: px4io/px4-dev-nuttx-focal:2021-04-29
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-02-04
|
||||
container: px4io/px4-dev-clang:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-02-04
|
||||
container: px4io/px4-dev-armhf:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-02-04
|
||||
container: px4io/px4-dev-aarch64:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: px4io/px4-dev-nuttx-focal:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
@@ -19,6 +19,9 @@ jobs:
|
||||
ark_can-flow_canbootloader,
|
||||
ark_can-flow_debug,
|
||||
ark_can-flow_default,
|
||||
ark_can-gps_canbootloader,
|
||||
ark_can-gps_debug,
|
||||
ark_can-gps_default,
|
||||
av_x-v1_default,
|
||||
bitcraze_crazyflie21_default,
|
||||
bitcraze_crazyflie_default,
|
||||
@@ -26,23 +29,23 @@ jobs:
|
||||
cuav_can-gps-v1_debug,
|
||||
cuav_can-gps-v1_default,
|
||||
cuav_nora_default,
|
||||
cuav_nora_test,
|
||||
cuav_x7pro_default,
|
||||
cuav_x7pro_test,
|
||||
cubepilot_cubeorange_console,
|
||||
cubepilot_cubeorange_default,
|
||||
cubepilot_cubeyellow_console,
|
||||
cubepilot_cubeorange_test,
|
||||
cubepilot_cubeyellow_default,
|
||||
cubepilot_cubeyellow_test,
|
||||
cubepilot_io-v2_default,
|
||||
freefly_can-rtk-gps_canbootloader,
|
||||
freefly_can-rtk-gps_default,
|
||||
holybro_can-gps-v1_canbootloader,
|
||||
holybro_can-gps-v1_debug,
|
||||
holybro_can-gps-v1_default,
|
||||
holybro_durandal-v1_default,
|
||||
holybro_durandal-v1_test,
|
||||
holybro_kakutef7_default,
|
||||
holybro_pix32v5_default,
|
||||
modalai_fc-v1_default,
|
||||
modalai_fc-v1_rtps,
|
||||
modalai_fc-v2_default,
|
||||
mro_ctrl-zero-f7-oem_default,
|
||||
mro_ctrl-zero-f7_default,
|
||||
mro_ctrl-zero-h7-oem_default,
|
||||
@@ -64,7 +67,6 @@ jobs:
|
||||
px4_fmu-v2_fixedwing,
|
||||
px4_fmu-v2_multicopter,
|
||||
px4_fmu-v2_rover,
|
||||
px4_fmu-v2_test,
|
||||
px4_fmu-v3_default,
|
||||
px4_fmu-v4_cannode,
|
||||
px4_fmu-v4_default,
|
||||
@@ -83,7 +85,6 @@ jobs:
|
||||
px4_fmu-v5x_base_phy_DP83848C,
|
||||
px4_fmu-v5x_default,
|
||||
px4_fmu-v6u_default,
|
||||
px4_fmu-v6u_test,
|
||||
px4_fmu-v6x_default,
|
||||
px4_io-v2_default,
|
||||
spracing_h7extreme_default,
|
||||
@@ -128,6 +129,8 @@ jobs:
|
||||
run: make ${{matrix.config}} bloaty_symbols || true
|
||||
- name: make ${{matrix.config}} bloaty_templates
|
||||
run: make ${{matrix.config}} bloaty_templates || true
|
||||
- name: make ${{matrix.config}} bloaty_ram
|
||||
run: make ${{matrix.config}} bloaty_ram || true
|
||||
- name: make ${{matrix.config}} bloaty_compare_master
|
||||
run: make ${{matrix.config}} bloaty_compare_master || true
|
||||
- name: ccache post-run
|
||||
|
||||
@@ -11,12 +11,13 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: px4io/px4-dev-nuttx-focal:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
ark_can-flow_default,
|
||||
cuav_can-gps-v1_default,
|
||||
freefly_can-rtk-gps_default,
|
||||
holybro_can-gps-v1_default,
|
||||
#nxp_ucans32k146_default,
|
||||
px4_fmu-v4_cannode
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-02-04
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
name: MAVROS Avoidance Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {test_file: "mavros_posix_test_avoidance.test", vehicle: "iris_obs_avoid", mission: "avoidance", build_type: "RelWithDebInfo"}
|
||||
- {test_file: "mavros_posix_test_safe_landing.test", vehicle: "iris_obs_avoid", mission: "MC_safe_landing", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 5" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_avoidance_run.sh ${{matrix.config.test_file}} mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} || true
|
||||
|
||||
- name: Look at core files
|
||||
if: failure()
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
# - name: ecl EKF analysis
|
||||
# if: always()
|
||||
# run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# Report test coverage
|
||||
- name: Upload coverage
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
- name: Upload coverage information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavros_avoidance
|
||||
file: coverage/lcov.info
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-04-29
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-04-29
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
airframe:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
|
||||
uorb_graph:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: px4io/px4-dev-nuttx-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
|
||||
micrortps_agent:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
|
||||
ROS_msgs:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
ROS2_bridge:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: px4io/px4-dev-base-focal:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Install Python3
|
||||
run: sudo apt-get install python3 python3-setuptools python3-pip -y
|
||||
- name: Install tools
|
||||
run: pip3 install --user mypy flake8
|
||||
run: pip3 install --user mypy types-requests flake8
|
||||
- name: Check MAVSDK test scripts with mypy
|
||||
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
|
||||
- name: Check MAVSDK test scripts with flake8
|
||||
|
||||
@@ -15,12 +15,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
|
||||
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "RelWithDebInfo", model: "standard_vtol" } # Australia
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
|
||||
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer", model: "standard_vtol" } # Australia
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-02-04
|
||||
image: px4io/px4-dev-simulation-focal:2021-04-29
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -28,9 +29,9 @@ jobs:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.38.0/mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
run: dpkg -i "mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
|
||||
@@ -108,3 +108,5 @@ src/systemcmds/topic_listener/listener_generated.cpp
|
||||
# SITL
|
||||
dataman
|
||||
eeprom/
|
||||
|
||||
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
|
||||
|
||||
+10
-3
@@ -33,7 +33,7 @@
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/Micro-CDR.git
|
||||
branch = px4
|
||||
branch = master
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
@@ -59,7 +59,14 @@
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcannode_gps_demo/public_regulated_data_types"]
|
||||
path = src/drivers/uavcannode_gps_demo/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
|
||||
path = src/drivers/uavcannode_gps_demo/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard.git
|
||||
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
|
||||
path = src/drivers/uavcan_v1/legacy_data_types
|
||||
url = https://github.com/PX4/public_regulated_data_types.git
|
||||
branch = legacy
|
||||
[submodule "src/lib/crypto/monocypher"]
|
||||
path = src/lib/crypto/monocypher
|
||||
url = https://github.com/PX4/Monocypher.git
|
||||
|
||||
Vendored
+27
-2
@@ -66,6 +66,16 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow_canbootloader
|
||||
ark_can-gps_default:
|
||||
short: ark_can-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_default
|
||||
ark_can-gps_canbootloader:
|
||||
short: ark_can-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_canbootloader
|
||||
av_x-v1_default:
|
||||
short: av_x-v1
|
||||
buildType: MinSizeRel
|
||||
@@ -96,16 +106,26 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_x7pro_default
|
||||
cubepilot_cubeorange_console:
|
||||
cubepilot_cubeorange_test:
|
||||
short: cubepilot_cubeorange
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cubepilot_orange_console
|
||||
CONFIG: cubepilot_orange_test
|
||||
emlid_navio2_default:
|
||||
short: emlid_navio2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: emlid_navio2_default
|
||||
freefly_can-rtk-gps_default:
|
||||
short: freefly_can-rtk-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_default
|
||||
freefly_can-rtk-gps_canbootloader:
|
||||
short: freefly_can-rtk-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_canbootloader
|
||||
holybro_can-gps-v1_canbootloader:
|
||||
short: holybro_can-gps-v1_canbootloader
|
||||
buildType: MinSizeRel
|
||||
@@ -126,6 +146,11 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v1_default
|
||||
modalai_fc-v2_default:
|
||||
short: modalai_fc-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v2_default
|
||||
mro_ctrl-zero-f7_default:
|
||||
short: mro_ctrl-zero-f7
|
||||
buildType: MinSizeRel
|
||||
|
||||
@@ -185,6 +185,8 @@ if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O0)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O1)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O3)
|
||||
else()
|
||||
if(px4_constrained_flash_build)
|
||||
set(MAX_CUSTOM_OPT_LEVEL -Os)
|
||||
|
||||
Vendored
+14
-14
@@ -15,7 +15,7 @@ pipeline {
|
||||
// stage('Catkin build on ROS workspace') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-02-04'
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-04-29'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
// }
|
||||
// }
|
||||
@@ -56,7 +56,7 @@ pipeline {
|
||||
stage('Colcon build on ROS2 workspace') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-02-04'
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ pipeline {
|
||||
|
||||
stage('Airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -105,7 +105,7 @@ pipeline {
|
||||
|
||||
stage('Parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -125,7 +125,7 @@ pipeline {
|
||||
|
||||
stage('Module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -146,7 +146,7 @@ pipeline {
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-02-04'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ pipeline {
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -206,7 +206,7 @@ pipeline {
|
||||
|
||||
stage('QGroundControl') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -234,7 +234,7 @@ pipeline {
|
||||
|
||||
stage('microRTPS agent') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -264,7 +264,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -293,7 +293,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS2 bridge') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -336,7 +336,7 @@ pipeline {
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -374,7 +374,7 @@ pipeline {
|
||||
GIT_COMMITTER_NAME = "PX4BuildBot"
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '20'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ all: px4_sitl_default
|
||||
space := $(subst ,, )
|
||||
|
||||
define make_list
|
||||
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
|
||||
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
|
||||
endef
|
||||
|
||||
# Parsing
|
||||
@@ -165,6 +165,11 @@ ifdef PYTHON_EXECUTABLE
|
||||
CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
endif
|
||||
|
||||
# Check if the microRTPS agent is to be built
|
||||
ifdef BUILD_MICRORTPS_AGENT
|
||||
CMAKE_ARGS += -DBUILD_MICRORTPS_AGENT=ON
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
@@ -468,25 +473,27 @@ validate_module_configs:
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
|
||||
clean:
|
||||
@rm -rf "$(SRC_DIR)"/build
|
||||
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
|
||||
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@git submodule update --quiet --init --recursive --force || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --force
|
||||
@git submodule update --init --recursive --force --jobs 4
|
||||
|
||||
submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive || true
|
||||
@git submodule update --quiet --init --recursive --jobs 4 || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive
|
||||
@git submodule update --init --recursive --jobs 4
|
||||
|
||||
gazeboclean:
|
||||
@rm -rf ~/.gazebo/*
|
||||
|
||||
distclean: gazeboclean
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
@git submodule deinit --force $(SRC_DIR)
|
||||
@rm -rf "$(SRC_DIR)/build"
|
||||
@git clean --force -X "$(SRC_DIR)/msg/" "$(SRC_DIR)/platforms/" "$(SRC_DIR)/posix-configs/" "$(SRC_DIR)/ROMFS/" "$(SRC_DIR)/src/" "$(SRC_DIR)/test/" "$(SRC_DIR)/Tools/"
|
||||
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -115,6 +115,7 @@ add_custom_command(
|
||||
set(romfs_extract_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_extract.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT ${romfs_extract_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
add_subdirectory(airframes)
|
||||
|
||||
px4_add_romfs_files(
|
||||
px4-rc.params
|
||||
px4-rc.simulator
|
||||
px4-rc.mavlink
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (RTPS)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/10016_iris
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
|
||||
@@ -14,7 +14,8 @@
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
param set-default ASPD_STALL 10.0
|
||||
|
||||
param set-default FW_AIRSPD_STALL 8
|
||||
|
||||
param set-default FW_P_RMAX_NEG 20.0
|
||||
param set-default FW_P_RMAX_POS 60.0
|
||||
|
||||
@@ -46,8 +46,6 @@ px4_add_romfs_files(
|
||||
1014_solo
|
||||
1015_iris_obs_avoid
|
||||
1015_iris_obs_avoid.post
|
||||
1016_iris_rtps
|
||||
1016_iris_rtps.post
|
||||
1017_iris_opt_flow_mockup
|
||||
1018_iris_vision_velocity
|
||||
1019_iris_dual_gps
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
#param set MAV_SYS_ID $((px4_instance+1))
|
||||
#param set IMU_INTEG_RATE 250
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
@@ -5,7 +5,8 @@
|
||||
# shellcheck disable=SC1091
|
||||
. px4-alias.sh
|
||||
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
#search path for sourcing px4-rc.*
|
||||
PATH="$PATH:${R}etc/init.d-posix"
|
||||
|
||||
#
|
||||
# Main SITL startup script
|
||||
@@ -45,9 +46,9 @@ else
|
||||
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
|
||||
# TODO: unify with rc.autostart generation
|
||||
# shellcheck disable=SC2012
|
||||
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
REQUESTED_AUTOSTART=$(ls "${R}etc/init.d-posix/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
if [ -z "$REQUESTED_AUTOSTART" ]; then
|
||||
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on $SCRIPT_DIR/airframes)"
|
||||
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
|
||||
exit 1
|
||||
else
|
||||
echo "Info: found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
|
||||
@@ -104,15 +105,6 @@ fi
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
@@ -216,25 +208,14 @@ fi
|
||||
# Simulator IMU data provided at 250 Hz
|
||||
param set IMU_INTEG_RATE 250
|
||||
|
||||
#user defined params for instances can be in PATH
|
||||
. px4-rc.params
|
||||
|
||||
dataman start
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
if ! replay tryapplyparams
|
||||
then
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
. px4-rc.simulator
|
||||
fi
|
||||
load_mon start
|
||||
battery_simulator start
|
||||
@@ -244,6 +225,12 @@ sensors start
|
||||
commander start
|
||||
navigator start
|
||||
|
||||
# Try to start the micrortps_client with UDP transport if module exists
|
||||
if px4-micrortps_client status > /dev/null 2>&1
|
||||
then
|
||||
# shellcheck disable=SC2154
|
||||
micrortps_client start -t UDP $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
|
||||
fi
|
||||
|
||||
if param greater -s MNT_MODE_IN -1
|
||||
then
|
||||
@@ -272,32 +259,8 @@ fi
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
if [ -e etc/init.d-posix/rc.mavlink_override ]
|
||||
then
|
||||
echo "Running non-default mavlink config rc.mavlink_override"
|
||||
. ${R}etc/init.d-posix/rc.mavlink_override
|
||||
else
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
fi
|
||||
#user defined mavlink streams for instances can be in PATH
|
||||
. px4-rc.mavlink
|
||||
|
||||
# execute autostart post script if any
|
||||
[ -e "$autostart_file".post ] && . "$autostart_file".post
|
||||
|
||||
@@ -71,7 +71,6 @@ param set-default MPC_JERK_AUTO 4
|
||||
param set-default MPC_LAND_SPEED 1
|
||||
param set-default MPC_MAN_TILT_MAX 25
|
||||
param set-default MPC_MAN_Y_MAX 40
|
||||
param set-default MPC_POS_MODE 3
|
||||
param set-default MPC_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_THR_HOVER 0.45
|
||||
param set-default MPC_TILTMAX_AIR 25
|
||||
@@ -111,5 +110,6 @@ set MAV_TYPE 22
|
||||
set MIXER babyshark
|
||||
set MIXER_AUX pass
|
||||
|
||||
# Mark outputs for the alternate rate
|
||||
# or D-Shot
|
||||
set PWM_OUT 5678
|
||||
set PWM_AUX_OUT 1234
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Aion Robotics R1 UGV
|
||||
#
|
||||
# @url http://docs.aionrobotics.com/en/latest/r1-ugv.html
|
||||
# @url https://www.aionrobotics.com/r1
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
|
||||
@@ -16,6 +16,8 @@ param set-default COM_POS_FS_EPV 30
|
||||
param set-default COM_POS_FS_GAIN 0
|
||||
param set-default COM_POS_FS_PROB 1
|
||||
param set-default COM_VEL_FS_EVH 5
|
||||
# Disable preflight disarm to not interfere with external launching
|
||||
param set-default COM_DISARM_PRFLT -1
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
|
||||
@@ -26,6 +26,12 @@ then
|
||||
batt_smbus start -X
|
||||
fi
|
||||
|
||||
# Start batmon driver if enabled using BATMON_DRIVER_EN
|
||||
if param compare -s BATMON_DRIVER_EN 1
|
||||
then
|
||||
batmon start -X #start on external bus
|
||||
fi
|
||||
|
||||
# Sensors on the PWM interface bank
|
||||
if param compare -s SENS_EN_LL40LS 1
|
||||
then
|
||||
@@ -111,7 +117,14 @@ fi
|
||||
# ADIS16448 spi external IMU
|
||||
if param compare -s SENS_EN_ADIS164X 1
|
||||
then
|
||||
adis16448 -S start
|
||||
if param compare -s SENS_OR_ADIS164X 0
|
||||
then
|
||||
adis16448 -S start
|
||||
fi
|
||||
if param compare -s SENS_OR_ADIS164X 4
|
||||
then
|
||||
adis16448 -S start -R 4
|
||||
fi
|
||||
fi
|
||||
|
||||
# probe for optional external I2C devices
|
||||
|
||||
@@ -23,6 +23,7 @@ param set-default MPC_XY_ERR_MAX 5
|
||||
param set-default MPC_XY_VEL_MAX 4
|
||||
param set-default MPC_Z_VEL_MAX_DN 1.5
|
||||
param set-default MPC_JERK_MAX 4.5
|
||||
param set-default MPC_YAW_MODE 4
|
||||
|
||||
param set-default NAV_ACC_RAD 3
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ set FRC /fs/microsd/etc/rc.txt
|
||||
set IOFW "/etc/extras/px4_io-v2_default.bin"
|
||||
set IO_PRESENT no
|
||||
set LOGGER_ARGS ""
|
||||
set LOGGER_BUF 14
|
||||
set LOGGER_BUF 8
|
||||
set MAV_TYPE none
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
@@ -81,33 +81,6 @@ then
|
||||
hardfault_log reset
|
||||
fi
|
||||
fi
|
||||
|
||||
# Prevent MacOS and Ubuntu from creating unnecessary temporary files on the microSD card
|
||||
|
||||
# block MacOS Spotlight indexing (.Spotlight-V100 folder)
|
||||
if [ ! -f "/fs/microsd/.metadata_never_index" ]; then
|
||||
cat > /fs/microsd/.metadata_never_index
|
||||
fi
|
||||
|
||||
# block MacOS trashes
|
||||
if [ ! -f "/fs/microsd/.Trashes" ]; then
|
||||
cat > /fs/microsd/.Trashes
|
||||
fi
|
||||
|
||||
# block MacOS logging of filesystem events
|
||||
if [ ! -d "/fs/microsd/.fseventsd" ]; then
|
||||
mkdir /fs/microsd/.fseventsd
|
||||
fi
|
||||
|
||||
if [ ! -f "/fs/microsd/.fseventsd/no_log" ]; then
|
||||
cat > /fs/microsd/.fseventsd/no_log
|
||||
fi
|
||||
|
||||
# block Ubuntu trash
|
||||
if [ ! -f "/fs/microsd/.Trash-1000" ]; then
|
||||
cat > /fs/microsd/.Trash-1000
|
||||
fi
|
||||
|
||||
else
|
||||
# tune SD_INIT
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
@@ -404,21 +377,30 @@ else
|
||||
|
||||
if param greater -s TRIG_MODE 0
|
||||
then
|
||||
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
|
||||
if param compare TRIG_PINS 56
|
||||
if param compare TRIG_PINS_EX 0
|
||||
then
|
||||
# clear pins 5 and 6
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
else
|
||||
if param compare TRIG_PINS 78
|
||||
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
|
||||
if param compare TRIG_PINS 56
|
||||
then
|
||||
# clear pins 7 and 8
|
||||
set FMU_MODE pwm6
|
||||
set AUX_MODE pwm6
|
||||
# clear pins 5 and 6
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
else
|
||||
set FMU_MODE none
|
||||
set AUX_MODE none
|
||||
if param compare TRIG_PINS 78
|
||||
then
|
||||
# clear pins 7 and 8
|
||||
set FMU_MODE pwm6
|
||||
set AUX_MODE pwm6
|
||||
else
|
||||
set FMU_MODE none
|
||||
set AUX_MODE none
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if param compare TRIG_PINS_EX 12288
|
||||
then
|
||||
set FMU_MODE pwm12
|
||||
set AUX_MODE pwm12
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ if [ ! -f $HOOK_FILE ] && [ "$CI" != "true" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
${DIR}/files_to_check_code_style.sh | xargs -n 1 -P 8 -I % ${DIR}/check_code_style.sh %
|
||||
${DIR}/files_to_check_code_style.sh | xargs -P 8 -I % ${DIR}/check_code_style.sh %
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Format checks passed"
|
||||
|
||||
@@ -22,4 +22,5 @@ exec find boards msg src platforms test \
|
||||
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
|
||||
-path src/modules/micrortps_bridge/microRTPS_client -prune -o \
|
||||
-path test/mavsdk_tests/catch2 -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) | grep $PATTERN
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
custom_data_source: {
|
||||
name: "bloaty_static_ram"
|
||||
base_data_source: "sections"
|
||||
|
||||
rewrite: {
|
||||
pattern: "^\\.bss"
|
||||
replacement: "ram"
|
||||
}
|
||||
rewrite: {
|
||||
pattern: "^\\.data"
|
||||
replacement: "ram"
|
||||
}
|
||||
}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$0
|
||||
if [[ ${SCRIPT_DIR:0:1} != '/' ]]; then
|
||||
SCRIPT_DIR=$(dirname $(realpath -s "$PWD/$0"))
|
||||
fi
|
||||
|
||||
PX4_DIR=$(cd "$(dirname $(dirname $SCRIPT_DIR))" && pwd)
|
||||
|
||||
if [ -d $PX4_DIR/build/*_rtps ]; then
|
||||
cd $PX4_DIR/build/*_rtps/src/modules/micrortps_bridge/micrortps_agent/
|
||||
cmake -Bbuild
|
||||
cmake --build build -j$(nproc --all)
|
||||
fi
|
||||
@@ -81,7 +81,8 @@ def sign(bin_file_path, key_file_path=None, generated_key_file=None):
|
||||
# Align to 4 bytes. Signature always starts at
|
||||
# 4 byte aligned address, but the signee size
|
||||
# might not be aligned
|
||||
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
|
||||
if len(signee_bin)%4 != 0:
|
||||
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
|
||||
|
||||
try:
|
||||
with open(key_file_path,mode='r') as f:
|
||||
@@ -133,7 +134,7 @@ if(__name__ == "__main__"):
|
||||
parser.add_argument("signee", help=".bin file to add signature", nargs='?', default=None)
|
||||
parser.add_argument("signed", help="signed output .bin", nargs='?', default=None)
|
||||
|
||||
parser.add_argument("--key", help="key.json file", default="Tools/test_keys.json")
|
||||
parser.add_argument("--key", help="key.json file", default="Tools/test_keys/test_keys.json")
|
||||
parser.add_argument("--rdct", help="binary R&D certificate file", default=None)
|
||||
parser.add_argument("--genkey", help="new generated key", default=None)
|
||||
args = parser.parse_args()
|
||||
@@ -152,7 +153,7 @@ if(__name__ == "__main__"):
|
||||
sys.exit(1)
|
||||
|
||||
# Issue a warning when signing with testing key
|
||||
if args.key=='Tools/test_keys.json':
|
||||
if args.key=='Tools/test_keys/test_keys.json':
|
||||
print("WARNING: Signing with PX4 test key")
|
||||
|
||||
# Sign the binary
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
echo "guessing PX4_DOCKER_REPO based on input";
|
||||
if [[ $@ =~ .*px4_fmu.* ]]; then
|
||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-02-04"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-04-29"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-02-04"
|
||||
@@ -30,7 +30,7 @@ fi
|
||||
|
||||
# otherwise default to nuttx
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2020-09-14"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-04-29"
|
||||
fi
|
||||
|
||||
# docker hygiene
|
||||
|
||||
@@ -20,7 +20,7 @@ function spawn_model() {
|
||||
X=${X:=0.0}
|
||||
Y=${Y:=$((3*${N}))}
|
||||
|
||||
SUPPORTED_MODELS=("iris" "iris_rtps" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
|
||||
SUPPORTED_MODELS=("iris" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
|
||||
if [[ " ${SUPPORTED_MODELS[*]} " != *"$MODEL"* ]];
|
||||
then
|
||||
echo "ERROR: Currently only vehicle model $MODEL is not supported!"
|
||||
|
||||
+1
-1
Submodule Tools/jMAVSim updated: 358b6cca40...0a816d8100
+27
-12
@@ -12,6 +12,7 @@ import sys, select
|
||||
import termios
|
||||
from timeit import default_timer as timer
|
||||
from argparse import ArgumentParser
|
||||
import os
|
||||
|
||||
try:
|
||||
from pymavlink import mavutil
|
||||
@@ -135,15 +136,20 @@ def main():
|
||||
|
||||
mav_serialport.write('\n') # make sure the shell is started
|
||||
|
||||
# setup the console, so we can read one char at a time
|
||||
# disable echo & avoid buffering on stdin
|
||||
fd_in = sys.stdin.fileno()
|
||||
old_attr = termios.tcgetattr(fd_in)
|
||||
new_attr = termios.tcgetattr(fd_in)
|
||||
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
|
||||
new_attr[3] = new_attr[3] & ~termios.ICANON
|
||||
try:
|
||||
old_attr = termios.tcgetattr(fd_in)
|
||||
new_attr = termios.tcgetattr(fd_in)
|
||||
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
|
||||
new_attr[3] = new_attr[3] & ~termios.ICANON
|
||||
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
|
||||
except termios.error:
|
||||
# tcgetattr can fail if stdin is not a tty
|
||||
old_attr = None
|
||||
ubuf_stdin = os.fdopen(fd_in, 'rb', buffering=0)
|
||||
|
||||
try:
|
||||
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
|
||||
cur_line = ''
|
||||
command_history = []
|
||||
cur_history_index = 0
|
||||
@@ -156,11 +162,19 @@ def main():
|
||||
|
||||
next_heartbeat_time = timer()
|
||||
|
||||
while True:
|
||||
quit_time = None
|
||||
while quit_time is None or quit_time > timer():
|
||||
while True:
|
||||
i, o, e = select.select([sys.stdin], [], [], 0)
|
||||
i, o, e = select.select([ubuf_stdin], [], [], 0)
|
||||
if not i: break
|
||||
ch = sys.stdin.read(1)
|
||||
ch = ubuf_stdin.read(1).decode('utf8')
|
||||
|
||||
if len(ch) == 0: # EOF
|
||||
if quit_time is None:
|
||||
# run a bit longer to read the response (we could also
|
||||
# read until we get a prompt)
|
||||
quit_time = timer() + 1
|
||||
break
|
||||
|
||||
# provide a simple shell with command history
|
||||
if ch == '\n':
|
||||
@@ -182,8 +196,8 @@ def main():
|
||||
cur_line = cur_line[:-1]
|
||||
sys.stdout.write(ch)
|
||||
elif ord(ch) == 27:
|
||||
ch = sys.stdin.read(1) # skip one
|
||||
ch = sys.stdin.read(1)
|
||||
ch = ubuf_stdin.read(1).decode('utf8') # skip one
|
||||
ch = ubuf_stdin.read(1).decode('utf8')
|
||||
if ch == 'A': # arrow up
|
||||
if cur_history_index > 0:
|
||||
cur_history_index -= 1
|
||||
@@ -223,7 +237,8 @@ def main():
|
||||
mav_serialport.close()
|
||||
|
||||
finally:
|
||||
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
|
||||
if old_attr:
|
||||
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
@@ -7,6 +7,7 @@ import os
|
||||
import math
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import scipy as sp
|
||||
|
||||
from pyulog import *
|
||||
|
||||
@@ -63,6 +64,9 @@ def resampleWithDeltaX(x,y):
|
||||
|
||||
return resampledX,resampledY
|
||||
|
||||
def median_filter(data):
|
||||
return sp.signal.medfilt(data, 31)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Reads in IMU data from a static thermal calibration test and performs a curve fit of gyro, accel and baro bias vs temperature')
|
||||
parser.add_argument('filename', metavar='file.ulg', help='ULog input file')
|
||||
parser.add_argument('--no_resample', dest='noResample', action='store_const',
|
||||
@@ -184,12 +188,16 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_0_params['TC_G0_TMIN']-gyro_0_params['TC_G0_TREF'], gyro_0_params['TC_G0_TMAX']-gyro_0_params['TC_G0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_0_params['TC_G0_TREF']
|
||||
|
||||
sensor_gyro_0['x'] = median_filter(sensor_gyro_0['x'])
|
||||
sensor_gyro_0['y'] = median_filter(sensor_gyro_0['y'])
|
||||
sensor_gyro_0['z'] = median_filter(sensor_gyro_0['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],3)
|
||||
coef_gyro_0_x = np.polyfit(temp_rel, sensor_gyro_0['x'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['x'])
|
||||
coef_gyro_0_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_0['x'])
|
||||
coef_gyro_0_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_0'] = coef_gyro_0_x[0]
|
||||
gyro_0_params['TC_G0_X2_0'] = coef_gyro_0_x[1]
|
||||
@@ -200,10 +208,10 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
|
||||
# fit Y axis
|
||||
if noResample:
|
||||
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],3)
|
||||
coef_gyro_0_y = np.polyfit(temp_rel, sensor_gyro_0['y'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['y'])
|
||||
coef_gyro_0_y = np.polyfit(temp, sens ,3)
|
||||
coef_gyro_0_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_1'] = coef_gyro_0_y[0]
|
||||
gyro_0_params['TC_G0_X2_1'] = coef_gyro_0_y[1]
|
||||
@@ -214,9 +222,9 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
|
||||
# fit Z axis
|
||||
if noResample:
|
||||
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
|
||||
coef_gyro_0_z = np.polyfit(temp_rel, sensor_gyro_0['z'],3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['z'])
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_0['z'])
|
||||
coef_gyro_0_z = np.polyfit(temp, sens ,3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
|
||||
@@ -292,6 +300,10 @@ if num_gyros >= 2 and not math.isnan(sensor_gyro_1['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_1_params['TC_G1_TMIN']-gyro_1_params['TC_G1_TREF'], gyro_1_params['TC_G1_TMAX']-gyro_1_params['TC_G1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_1_params['TC_G1_TREF']
|
||||
|
||||
sensor_gyro_1['x'] = median_filter(sensor_gyro_1['x'])
|
||||
sensor_gyro_1['y'] = median_filter(sensor_gyro_1['y'])
|
||||
sensor_gyro_1['z'] = median_filter(sensor_gyro_1['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
|
||||
@@ -400,6 +412,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_2_params['TC_G2_TMIN']-gyro_2_params['TC_G2_TREF'], gyro_2_params['TC_G2_TMAX']-gyro_2_params['TC_G2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_2_params['TC_G2_TREF']
|
||||
|
||||
sensor_gyro_2['x'] = median_filter(sensor_gyro_2['x'])
|
||||
sensor_gyro_2['y'] = median_filter(sensor_gyro_2['y'])
|
||||
sensor_gyro_2['z'] = median_filter(sensor_gyro_2['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
|
||||
@@ -416,10 +432,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
|
||||
# fit Y axis
|
||||
if noResample:
|
||||
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],3)
|
||||
coef_gyro_2_y = np.polyfit(temp_rel, sensor_gyro_2['y'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_2['y'])
|
||||
coef_gyro_2_y = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_2['y'])
|
||||
coef_gyro_2_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_2_params['TC_G2_X3_1'] = coef_gyro_2_y[0]
|
||||
gyro_2_params['TC_G2_X2_1'] = coef_gyro_2_y[1]
|
||||
@@ -430,10 +446,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
|
||||
# fit Z axis
|
||||
if noResample:
|
||||
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],3)
|
||||
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_2['z'])
|
||||
coef_gyro_2_z = np.polyfit(temp, sens ,3)
|
||||
coef_gyro_2_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_2_params['TC_G2_X3_2'] = coef_gyro_2_z[0]
|
||||
gyro_2_params['TC_G2_X2_2'] = coef_gyro_2_z[1]
|
||||
@@ -508,8 +524,12 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_3_params['TC_G3_TMIN']-gyro_3_params['TC_G3_TREF'], gyro_3_params['TC_G3_TMAX']-gyro_3_params['TC_G3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_3_params['TC_G3_TREF']
|
||||
|
||||
sensor_gyro_3['x'] = median_filter(sensor_gyro_3['x'])
|
||||
sensor_gyro_3['y'] = median_filter(sensor_gyro_3['y'])
|
||||
sensor_gyro_3['z'] = median_filter(sensor_gyro_3['z'])
|
||||
|
||||
# fit X axis
|
||||
coef_gyro_3_x = np.polyfit(temp_rel,sensor_gyro_3['x'],3)
|
||||
coef_gyro_3_x = np.polyfit(temp_rel,sensor_gyro_3['x'], 3)
|
||||
gyro_3_params['TC_G3_X3_0'] = coef_gyro_3_x[0]
|
||||
gyro_3_params['TC_G3_X2_0'] = coef_gyro_3_x[1]
|
||||
gyro_3_params['TC_G3_X1_0'] = coef_gyro_3_x[2]
|
||||
@@ -518,7 +538,7 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
gyro_3_x_resample = fit_coef_gyro_3_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
coef_gyro_3_y = np.polyfit(temp_rel,sensor_gyro_3['y'],3)
|
||||
coef_gyro_3_y = np.polyfit(temp_rel,sensor_gyro_3['y'], 3)
|
||||
gyro_3_params['TC_G3_X3_1'] = coef_gyro_3_y[0]
|
||||
gyro_3_params['TC_G3_X2_1'] = coef_gyro_3_y[1]
|
||||
gyro_3_params['TC_G3_X1_1'] = coef_gyro_3_y[2]
|
||||
@@ -527,7 +547,7 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
gyro_3_y_resample = fit_coef_gyro_3_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
coef_gyro_3_z = np.polyfit(temp_rel,sensor_gyro_3['z'],3)
|
||||
coef_gyro_3_z = np.polyfit(temp_rel,sensor_gyro_3['z'], 3)
|
||||
gyro_3_params['TC_G3_X3_2'] = coef_gyro_3_z[0]
|
||||
gyro_3_params['TC_G3_X2_2'] = coef_gyro_3_z[1]
|
||||
gyro_3_params['TC_G3_X1_2'] = coef_gyro_3_z[2]
|
||||
@@ -540,8 +560,8 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
|
||||
# draw plots
|
||||
plt.subplot(3,1,1)
|
||||
plt.plot(sensor_gyro_3['temperature'],sensor_gyro_3['x'],'b')
|
||||
plt.plot(temp_resample,gyro_3_x_resample,'r')
|
||||
plt.plot(sensor_gyro_3['temperature'],sensor_gyro_3['x'], 'b')
|
||||
plt.plot(temp_resample,gyro_3_x_resample, 'r')
|
||||
plt.title('Gyro 2 ({}) Bias vs Temperature'.format(gyro_3_params['TC_G3_ID']))
|
||||
plt.ylabel('X bias (rad/s)')
|
||||
plt.xlabel('temperature (degC)')
|
||||
@@ -601,13 +621,17 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_0_params['TC_A0_TMIN']-accel_0_params['TC_A0_TREF'], accel_0_params['TC_A0_TMAX']-accel_0_params['TC_A0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_0_params['TC_A0_TREF']
|
||||
|
||||
sensor_accel_0['x'] = median_filter(sensor_accel_0['x'])
|
||||
sensor_accel_0['y'] = median_filter(sensor_accel_0['y'])
|
||||
sensor_accel_0['z'] = median_filter(sensor_accel_0['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
|
||||
if noResample:
|
||||
coef_accel_0_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_0_x = np.polyfit(temp_rel,correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_0_x = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_0'] = coef_accel_0_x[0]
|
||||
accel_0_params['TC_A0_X2_0'] = coef_accel_0_x[1]
|
||||
@@ -617,12 +641,12 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_0_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_0['y']-np.median(sensor_accel_0['y'])
|
||||
correction_y = sensor_accel_0['y'] - np.median(sensor_accel_0['y'])
|
||||
if noResample:
|
||||
coef_accel_0_y = np.polyfit(temp_rel,correction_y,3)
|
||||
coef_accel_0_y = np.polyfit(temp_rel, correction_y, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_y)
|
||||
coef_accel_0_y = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_1'] = coef_accel_0_y[0]
|
||||
accel_0_params['TC_A0_X2_1'] = coef_accel_0_y[1]
|
||||
@@ -632,12 +656,12 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_0_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_0['z']-np.median(sensor_accel_0['z'])
|
||||
correction_z = sensor_accel_0['z'] - np.median(sensor_accel_0['z'])
|
||||
if noResample:
|
||||
coef_accel_0_z = np.polyfit(temp_rel,correction_z,3)
|
||||
coef_accel_0_z = np.polyfit(temp_rel,correction_z, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_z)
|
||||
coef_accel_0_z = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_2'] = coef_accel_0_z[0]
|
||||
accel_0_params['TC_A0_X2_2'] = coef_accel_0_z[1]
|
||||
@@ -712,13 +736,17 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_1_params['TC_A1_TMIN']-accel_1_params['TC_A1_TREF'], accel_1_params['TC_A1_TMAX']-accel_1_params['TC_A1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_1_params['TC_A1_TREF']
|
||||
|
||||
sensor_accel_1['x'] = median_filter(sensor_accel_1['x'])
|
||||
sensor_accel_1['y'] = median_filter(sensor_accel_1['y'])
|
||||
sensor_accel_1['z'] = median_filter(sensor_accel_1['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
|
||||
correction_x = sensor_accel_1['x'] - np.median(sensor_accel_1['x'])
|
||||
if noResample:
|
||||
coef_accel_1_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_1_x = np.polyfit(temp_rel, correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_1_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, correction_x)
|
||||
coef_accel_1_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_1_params['TC_A1_X3_0'] = coef_accel_1_x[0]
|
||||
accel_1_params['TC_A1_X2_0'] = coef_accel_1_x[1]
|
||||
@@ -728,7 +756,7 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_1_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_1['y']-np.median(sensor_accel_1['y'])
|
||||
correction_y = sensor_accel_1['y'] - np.median(sensor_accel_1['y'])
|
||||
if noResample:
|
||||
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
|
||||
else:
|
||||
@@ -743,12 +771,12 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_1_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = (sensor_accel_1['z'])-np.median(sensor_accel_1['z'])
|
||||
correction_z = sensor_accel_1['z'] - np.median(sensor_accel_1['z'])
|
||||
if noResample:
|
||||
coef_accel_1_z = np.polyfit(temp_rel,correction_z,3)
|
||||
coef_accel_1_z = np.polyfit(temp_rel,correction_z, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_z)
|
||||
coef_accel_1_z = np.polyfit(temp, sens ,3)
|
||||
coef_accel_1_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_1_params['TC_A1_X3_2'] = coef_accel_1_z[0]
|
||||
accel_1_params['TC_A1_X2_2'] = coef_accel_1_z[1]
|
||||
@@ -824,13 +852,17 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_2_params['TC_A2_TMIN']-accel_2_params['TC_A2_TREF'], accel_2_params['TC_A2_TMAX']-accel_2_params['TC_A2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_2_params['TC_A2_TREF']
|
||||
|
||||
sensor_accel_2['x'] = median_filter(sensor_accel_2['x'])
|
||||
sensor_accel_2['y'] = median_filter(sensor_accel_2['y'])
|
||||
sensor_accel_2['z'] = median_filter(sensor_accel_2['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
|
||||
correction_x = sensor_accel_2['x'] - np.median(sensor_accel_2['x'])
|
||||
if noResample:
|
||||
coef_accel_2_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_2_x = np.polyfit(temp_rel,correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_2_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, correction_x)
|
||||
coef_accel_2_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_2_params['TC_A2_X3_0'] = coef_accel_2_x[0]
|
||||
accel_2_params['TC_A2_X2_0'] = coef_accel_2_x[1]
|
||||
@@ -840,7 +872,7 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_2_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_2['y']-np.median(sensor_accel_2['y'])
|
||||
correction_y = sensor_accel_2['y'] - np.median(sensor_accel_2['y'])
|
||||
if noResample:
|
||||
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
|
||||
else:
|
||||
@@ -855,7 +887,7 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_2_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_2['z']-np.median(sensor_accel_2['z'])
|
||||
correction_z = sensor_accel_2['z'] - np.median(sensor_accel_2['z'])
|
||||
if noResample:
|
||||
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
|
||||
else:
|
||||
@@ -935,9 +967,13 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_3_params['TC_A3_TMIN']-accel_3_params['TC_A3_TREF'], accel_3_params['TC_A3_TMAX']-accel_3_params['TC_A3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_3_params['TC_A3_TREF']
|
||||
|
||||
sensor_accel_3['x'] = median_filter(sensor_accel_3['x'])
|
||||
sensor_accel_3['y'] = median_filter(sensor_accel_3['y'])
|
||||
sensor_accel_3['z'] = median_filter(sensor_accel_3['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_3['x']-np.median(sensor_accel_3['x'])
|
||||
coef_accel_3_x = np.polyfit(temp_rel,correction_x,3)
|
||||
correction_x = sensor_accel_3['x'] - np.median(sensor_accel_3['x'])
|
||||
coef_accel_3_x = np.polyfit(temp_rel, correction_x, 3)
|
||||
accel_3_params['TC_A3_X3_0'] = coef_accel_3_x[0]
|
||||
accel_3_params['TC_A3_X2_0'] = coef_accel_3_x[1]
|
||||
accel_3_params['TC_A3_X1_0'] = coef_accel_3_x[2]
|
||||
@@ -946,8 +982,8 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_3_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_3['y']-np.median(sensor_accel_3['y'])
|
||||
coef_accel_3_y = np.polyfit(temp_rel,correction_y,3)
|
||||
correction_y = sensor_accel_3['y'] - np.median(sensor_accel_3['y'])
|
||||
coef_accel_3_y = np.polyfit(temp_rel, correction_y, 3)
|
||||
accel_3_params['TC_A3_X3_1'] = coef_accel_3_y[0]
|
||||
accel_3_params['TC_A3_X2_1'] = coef_accel_3_y[1]
|
||||
accel_3_params['TC_A3_X1_1'] = coef_accel_3_y[2]
|
||||
@@ -956,8 +992,8 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_3_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_3['z']-np.median(sensor_accel_3['z'])
|
||||
coef_accel_3_z = np.polyfit(temp_rel,correction_z,3)
|
||||
correction_z = sensor_accel_3['z'] - np.median(sensor_accel_3['z'])
|
||||
coef_accel_3_z = np.polyfit(temp_rel, correction_z, 3)
|
||||
accel_3_params['TC_A3_X3_2'] = coef_accel_3_z[0]
|
||||
accel_3_params['TC_A3_X2_2'] = coef_accel_3_z[1]
|
||||
accel_3_params['TC_A3_X1_2'] = coef_accel_3_z[2]
|
||||
@@ -1024,8 +1060,10 @@ temp_rel = sensor_baro_0['temperature'] - baro_0_params['TC_B0_TREF']
|
||||
temp_rel_resample = np.linspace(baro_0_params['TC_B0_TMIN']-baro_0_params['TC_B0_TREF'], baro_0_params['TC_B0_TMAX']-baro_0_params['TC_B0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_0_params['TC_B0_TREF']
|
||||
|
||||
sensor_baro_0['pressure'] = median_filter(sensor_baro_0['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_0['pressure']);
|
||||
median_pressure = np.median(sensor_baro_0['pressure'])
|
||||
if noResample:
|
||||
coef_baro_0_x = np.polyfit(temp_rel,100*(sensor_baro_0['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1081,8 +1119,10 @@ if num_baros >= 2:
|
||||
temp_rel_resample = np.linspace(baro_1_params['TC_B1_TMIN']-baro_1_params['TC_B1_TREF'], baro_1_params['TC_B1_TMAX']-baro_1_params['TC_B1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_1_params['TC_B1_TREF']
|
||||
|
||||
sensor_baro_1['pressure'] = median_filter(sensor_baro_1['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_1['pressure']);
|
||||
median_pressure = np.median(sensor_baro_1['pressure'])
|
||||
if noResample:
|
||||
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1139,8 +1179,10 @@ if num_baros >= 3:
|
||||
temp_rel_resample = np.linspace(baro_2_params['TC_B2_TMIN']-baro_2_params['TC_B2_TREF'], baro_2_params['TC_B2_TMAX']-baro_2_params['TC_B2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_2_params['TC_B2_TREF']
|
||||
|
||||
sensor_baro_2['pressure'] = median_filter(sensor_baro_2['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_2['pressure']);
|
||||
median_pressure = np.median(sensor_baro_2['pressure'])
|
||||
if noResample:
|
||||
coef_baro_2_x = np.polyfit(temp_rel,100*(sensor_baro_2['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1197,6 +1239,8 @@ if num_baros >= 4:
|
||||
temp_rel_resample = np.linspace(baro_3_params['TC_B3_TMIN']-baro_3_params['TC_B3_TREF'], baro_3_params['TC_B3_TMAX']-baro_3_params['TC_B3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_3_params['TC_B3_TREF']
|
||||
|
||||
sensor_baro_3['pressure'] = median_filter(sensor_baro_3['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_3['pressure'])
|
||||
coef_baro_3_x = np.polyfit(temp_rel,100*(sensor_baro_3['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
|
||||
@@ -6,7 +6,7 @@ import html
|
||||
class MarkdownTablesOutput():
|
||||
def __init__(self, groups, board, image_path):
|
||||
result = ("# Airframes Reference\n"
|
||||
"> **Note** **This list is [auto-generated](https://github.com/PX4/Firmware/edit/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
|
||||
"> **Note** **This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
|
||||
"> \n"
|
||||
"> **AUX** channels may not be present on some flight controllers.\n"
|
||||
"> If present, PWM AUX channels are commonly labelled **AUX OUT**.\n"
|
||||
|
||||
@@ -98,6 +98,8 @@ class ParameterGroup(object):
|
||||
return "Boat"
|
||||
elif (self.name == "Balloon"):
|
||||
return "Balloon"
|
||||
elif (self.name == "Vectored 6 DOF UUV"):
|
||||
return "Vectored6DofUUV"
|
||||
return "AirframeUnknown"
|
||||
|
||||
def GetParams(self):
|
||||
|
||||
@@ -28,7 +28,7 @@ available commands, and in most cases `command help` will print the usage.
|
||||
Since this is generated from source, errors must be reported/fixed
|
||||
in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) repository.
|
||||
The documentation pages can be generated by running the following command from
|
||||
the root of the Firmware directory:
|
||||
the root of the PX4-Autopilot directory:
|
||||
```
|
||||
make module_documentation
|
||||
```
|
||||
@@ -66,7 +66,7 @@ The generated files will be written to the `modules` directory.
|
||||
result = ''
|
||||
for module in module_list:
|
||||
result += "## %s\n" % module.name()
|
||||
result += "Source: [%s](https://github.com/PX4/Firmware/tree/master/src/%s)\n\n" % (module.scope(), module.scope())
|
||||
result += "Source: [%s](https://github.com/PX4/PX4-Autopilot/tree/master/src/%s)\n\n" % (module.scope(), module.scope())
|
||||
doc = module.documentation()
|
||||
if len(doc) > 0:
|
||||
result += "%s\n" % doc
|
||||
|
||||
+10
-24
@@ -56,7 +56,6 @@ from __future__ import print_function
|
||||
import sys
|
||||
import argparse
|
||||
import binascii
|
||||
import serial
|
||||
import socket
|
||||
import struct
|
||||
import json
|
||||
@@ -68,6 +67,16 @@ import os
|
||||
|
||||
from sys import platform as _platform
|
||||
|
||||
try:
|
||||
import serial
|
||||
except ImportError as e:
|
||||
print("Failed to import serial: " + str(e))
|
||||
print("")
|
||||
print("You may need to install it using:")
|
||||
print(" pip3 install --user pyserial")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
# Detect python version
|
||||
if sys.version_info[0] < 3:
|
||||
runningPython3 = False
|
||||
@@ -726,29 +735,6 @@ def main():
|
||||
print("WARNING: You should uninstall ModemManager as it conflicts with any non-modem serial device (like Pixhawk)")
|
||||
print("==========================================================================================================")
|
||||
|
||||
# We need to check for pyserial because the import itself doesn't
|
||||
# seem to fail, at least not on macOS.
|
||||
pyserial_installed = False
|
||||
try:
|
||||
if serial.__version__:
|
||||
pyserial_installed = True
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
if serial.VERSION:
|
||||
pyserial_installed = True
|
||||
except:
|
||||
pass
|
||||
|
||||
if not pyserial_installed:
|
||||
print("Error: pyserial not installed!")
|
||||
print("")
|
||||
print("You may need to install it using:")
|
||||
print(" pip3 install --user pyserial")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
# Load the firmware file
|
||||
fw = firmware(args.firmware)
|
||||
|
||||
|
||||
+1
-2
@@ -155,8 +155,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
# fix VMWare 3D graphics acceleration for gazebo
|
||||
exportline="export SVGA_VGPU10=0"
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
else
|
||||
if !grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ fi
|
||||
|
||||
# Python dependencies
|
||||
echo "Installing PX4 Python3 dependencies"
|
||||
pip3 install --user -r ${DIR}/requirements.txt
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
|
||||
# Optional, but recommended additional simulation tools:
|
||||
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
||||
|
||||
@@ -6,7 +6,7 @@ empy>=3.3
|
||||
jinja2>=2.8
|
||||
matplotlib>=3.0.*
|
||||
numpy>=1.13
|
||||
nunavut
|
||||
nunavut>=1.1.0
|
||||
packaging
|
||||
pandas>=0.21
|
||||
pkgconfig
|
||||
@@ -15,7 +15,7 @@ pygments
|
||||
wheel>=0.31.1
|
||||
pymavlink
|
||||
pyros-genmsg
|
||||
pyserial>=3.0
|
||||
pyserial
|
||||
pyulog>=0.5.0
|
||||
pyyaml
|
||||
requests
|
||||
|
||||
+18
-4
@@ -115,18 +115,32 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo "Installing NuttX dependencies"
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
autoconf \
|
||||
automake \
|
||||
binutils-dev \
|
||||
bison \
|
||||
bzip2 \
|
||||
file \
|
||||
build-essential \
|
||||
flex \
|
||||
g++-multilib \
|
||||
gcc-multilib \
|
||||
gdb-multiarch \
|
||||
genromfs \
|
||||
gettext \
|
||||
gperf \
|
||||
libncurses-dev \
|
||||
kconfig-frontends \
|
||||
libelf-dev \
|
||||
libexpat-dev \
|
||||
libgmp-dev \
|
||||
libisl-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
libtool \
|
||||
pkg-config \
|
||||
screen \
|
||||
texinfo \
|
||||
u-boot-tools \
|
||||
util-linux \
|
||||
vim-common \
|
||||
;
|
||||
|
||||
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 5761bd66cd...822050a7ab
@@ -0,0 +1,5 @@
|
||||
//Public key to verify signed binaries
|
||||
0x4d, 0xb0, 0xc2, 0x1, 0x5, 0x55, 0x2a, 0x3c,
|
||||
0xd7, 0xfb, 0xaf, 0x5c, 0xba, 0x7a, 0xb0, 0x81,
|
||||
0x1b, 0x36, 0x63, 0xdb, 0x28, 0x52, 0x5e, 0xdb,
|
||||
0x14, 0x36, 0xf2, 0x57, 0x8d, 0x2, 0xb7, 0xfd,
|
||||
@@ -8,7 +8,6 @@ px4_add_board(
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
ROMFSROOT px4fmu_common
|
||||
TESTING
|
||||
UAVCAN_INTERFACES 1
|
||||
SERIAL_PORTS
|
||||
GPS1:/dev/ttyS3
|
||||
@@ -47,8 +46,8 @@ px4_add_board(
|
||||
rc_input
|
||||
roboclaw
|
||||
rpm
|
||||
smart_battery/batmon
|
||||
telemetry # all available telemetry drivers
|
||||
test_ppm
|
||||
tone_alarm
|
||||
uavcan
|
||||
MODULES
|
||||
@@ -110,7 +109,6 @@ px4_add_board(
|
||||
sd_bench
|
||||
serial_test
|
||||
system_time
|
||||
tests # tests and test runner
|
||||
top
|
||||
topic_listener
|
||||
tune_control
|
||||
@@ -120,15 +118,15 @@ px4_add_board(
|
||||
work_queue
|
||||
EXAMPLES
|
||||
fake_gps
|
||||
fake_gyro
|
||||
fake_magnetometer
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
hwtest # Hardware test
|
||||
#fake_imu
|
||||
#fake_magnetometer
|
||||
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
#hello
|
||||
#hwtest # Hardware test
|
||||
#matlab_csv_serial
|
||||
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
|
||||
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
|
||||
rover_steering_control # Rover example app
|
||||
uuv_example_app
|
||||
work_item
|
||||
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
|
||||
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
|
||||
#rover_steering_control # Rover example app
|
||||
#uuv_example_app
|
||||
#work_item
|
||||
)
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
@@ -12,7 +12,9 @@ px4_add_board(
|
||||
UAVCAN_INTERFACES 1
|
||||
DRIVERS
|
||||
bootloaders
|
||||
distance_sensor/broadcom/afbrs50
|
||||
imu/bosch/bmi088
|
||||
imu/invensense/icm42688p
|
||||
optical_flow/paw3902
|
||||
uavcannode
|
||||
MODULES
|
||||
@@ -20,14 +22,13 @@ px4_add_board(
|
||||
load_mon
|
||||
#sensors
|
||||
SYSTEMCMDS
|
||||
mft
|
||||
mtd
|
||||
param
|
||||
perf
|
||||
reboot
|
||||
system_time
|
||||
top
|
||||
topic_listener
|
||||
#topic_listener
|
||||
uorb
|
||||
ver
|
||||
work_queue
|
||||
)
|
||||
|
||||
@@ -13,7 +13,9 @@ px4_add_board(
|
||||
UAVCAN_INTERFACES 1
|
||||
DRIVERS
|
||||
bootloaders
|
||||
distance_sensor/broadcom/afbrs50
|
||||
imu/bosch/bmi088
|
||||
imu/invensense/icm42688p
|
||||
optical_flow/paw3902
|
||||
uavcannode
|
||||
MODULES
|
||||
@@ -21,14 +23,13 @@ px4_add_board(
|
||||
#load_mon
|
||||
#sensors
|
||||
SYSTEMCMDS
|
||||
mft
|
||||
mtd
|
||||
param
|
||||
#perf
|
||||
#reboot
|
||||
#system_time
|
||||
#top
|
||||
#topic_listener
|
||||
#uorb
|
||||
#ver
|
||||
#work_queue
|
||||
)
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Internal SPI
|
||||
paw3902 -s start -Y 90
|
||||
bmi088 -A -s -R 4 start
|
||||
bmi088 -G -s -R 4 start
|
||||
paw3902 -s start -Y 180
|
||||
|
||||
if ! icm42688p -R 0 -s start
|
||||
then
|
||||
bmi088 -A -s -R 4 start
|
||||
bmi088 -G -s -R 4 start
|
||||
fi
|
||||
|
||||
afbrs50 start
|
||||
|
||||
@@ -133,8 +133,8 @@
|
||||
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1
|
||||
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1
|
||||
|
||||
#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1
|
||||
#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1
|
||||
#define GPIO_SPI2_SCK GPIO_SPI2_SCK_1
|
||||
#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1 /* PB14 */
|
||||
#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1 /* PB15 */
|
||||
#define GPIO_SPI2_SCK GPIO_SPI2_SCK_1 /* PB10 */
|
||||
|
||||
#endif /* __ARCH_BOARD_BOARD_H */
|
||||
|
||||
@@ -40,6 +40,4 @@
|
||||
// DMA2 Channel/Stream Selections
|
||||
//--------------------------------------------//---------------------------//----------------
|
||||
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_2 // DMA2, Stream 2, Channel 3
|
||||
#define DMACHAN_SPI2_RX DMAMAP_SPI2_RX // DMA2, Stream 3, Channel 0
|
||||
#define DMACHAN_SPI2_TX DMAMAP_SPI2_TX // DMA2, Stream 4, Channel 0
|
||||
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 5, Channel 3
|
||||
|
||||
@@ -144,8 +144,6 @@ CONFIG_STM32_SPI1=y
|
||||
CONFIG_STM32_SPI1_DMA=y
|
||||
CONFIG_STM32_SPI1_DMA_BUFFER=1024
|
||||
CONFIG_STM32_SPI2=y
|
||||
CONFIG_STM32_SPI2_DMA=y
|
||||
CONFIG_STM32_SPI2_DMA_BUFFER=1024
|
||||
CONFIG_STM32_SPI_DMA=y
|
||||
CONFIG_STM32_TIM8=y
|
||||
CONFIG_STM32_USART2=y
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
#define GPIO_nLED_RED /* PB3 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN3)
|
||||
#define GPIO_nLED_BLUE /* PA8 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN8)
|
||||
|
||||
#define BROADCOM_AFBR_S50_S2PI_SPI_BUS 2
|
||||
#define BROADCOM_AFBR_S50_S2PI_CS /* PB12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN12)
|
||||
#define BROADCOM_AFBR_S50_S2PI_IRQ /* PB4 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN4|GPIO_EXTI)
|
||||
#define BROADCOM_AFBR_S50_S2PI_CLK /* PB10 */ GPIO_SPI2_SCK_1
|
||||
#define BROADCOM_AFBR_S50_S2PI_MOSI /* PB15 */ GPIO_SPI2_MOSI_1
|
||||
#define BROADCOM_AFBR_S50_S2PI_MISO /* PB14 */ GPIO_SPI2_MISO_1
|
||||
|
||||
#define BOARD_HAS_CONTROL_STATUS_LEDS 1
|
||||
#define BOARD_OVERLOAD_LED LED_RED
|
||||
#define BOARD_ARMED_STATE_LED LED_BLUE
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
@@ -60,6 +61,7 @@
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_board_led.h>
|
||||
#include <drivers/drv_watchdog.h>
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
|
||||
@@ -87,6 +89,8 @@ __END_DECLS
|
||||
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
watchdog_init();
|
||||
|
||||
// Configure CAN interface
|
||||
stm32_configgpio(GPIO_CAN1_RX);
|
||||
stm32_configgpio(GPIO_CAN1_TX);
|
||||
|
||||
@@ -39,6 +39,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin15}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
|
||||
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
|
||||
initSPIDevice(DRV_FLOW_DEVTYPE_PAW3902, SPI::CS{GPIO::PortB, GPIO::Pin5}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-gps
|
||||
LABEL canbootloader
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
DRIVERS
|
||||
bootloaders
|
||||
)
|
||||
@@ -0,0 +1,38 @@
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-gps
|
||||
LABEL debug
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
ROMFSROOT cannode
|
||||
UAVCAN_INTERFACES 1
|
||||
DRIVERS
|
||||
barometer/bmp388
|
||||
bootloaders
|
||||
gps
|
||||
imu/invensense/icm42688p
|
||||
magnetometer/bosch/bmm150
|
||||
safety_button
|
||||
tone_alarm
|
||||
uavcannode
|
||||
MODULES
|
||||
#ekf2
|
||||
#load_mon
|
||||
#sensors
|
||||
SYSTEMCMDS
|
||||
i2cdetect
|
||||
led_control
|
||||
param
|
||||
perf
|
||||
reboot
|
||||
top
|
||||
topic_listener
|
||||
tune_control
|
||||
uorb
|
||||
ver
|
||||
work_queue
|
||||
)
|
||||
@@ -0,0 +1,38 @@
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-gps
|
||||
LABEL default
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
#CONSTRAINED_FLASH
|
||||
CONSTRAINED_MEMORY
|
||||
ROMFSROOT cannode
|
||||
UAVCAN_INTERFACES 1
|
||||
DRIVERS
|
||||
barometer/bmp388
|
||||
bootloaders
|
||||
gps
|
||||
imu/invensense/icm42688p
|
||||
magnetometer/bosch/bmm150
|
||||
safety_button
|
||||
tone_alarm
|
||||
uavcannode
|
||||
MODULES
|
||||
#ekf2
|
||||
#load_mon
|
||||
#sensors
|
||||
SYSTEMCMDS
|
||||
#mft
|
||||
#mtd
|
||||
param
|
||||
#perf
|
||||
#reboot
|
||||
#system_time
|
||||
#top
|
||||
#topic_listener
|
||||
#ver
|
||||
#work_queue
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"board_id": 81,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the ARK gps board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "ARKGPS",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 2080768,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
param set-default CBRK_IO_SAFETY 0
|
||||
|
||||
safety_button start
|
||||
tone_alarm start
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board sensors init
|
||||
#------------------------------------------------------------------------------
|
||||
gps start -d /dev/ttyS0 -p ubx
|
||||
|
||||
icm42688p -R 0 -s start
|
||||
|
||||
bmp388 -I -b 2 start
|
||||
|
||||
bmm150 -I -b 1 start
|
||||
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||
CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F412CE=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=4096
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BINFMT_DISABLE=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CLOCK_MONOTONIC=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_PTHREAD=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FDCLONE_DISABLE=y
|
||||
CONFIG_FDCLONE_STDIO=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=4096
|
||||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_MAX_TASKS=0
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_NAME_MAX=0
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_NXFONTS_DISABLE_16BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_1BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_24BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_2BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_32BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_4BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_8BPP=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAM_SIZE=262144
|
||||
CONFIG_RAM_START=0x20010000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SIG_SIGALRM_ACTION=y
|
||||
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=30
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_STM32_NOEXT_VECTORS=y
|
||||
CONFIG_STM32_TIM8=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
CONFIG_USERMAIN_STACKSIZE=4096
|
||||
@@ -0,0 +1,152 @@
|
||||
/************************************************************************************
|
||||
* configs/px4fmu/include/board.h
|
||||
* include/arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
#include "board_dma_map.h"
|
||||
|
||||
#ifndef __ARCH_BOARD_BOARD_H
|
||||
#define __ARCH_BOARD_BOARD_H
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <stm32.h>
|
||||
|
||||
/* HSI - 8 MHz RC factory-trimmed
|
||||
* LSI - 32 KHz RC
|
||||
* HSE - 8 MHz Crystal
|
||||
* LSE - not installed
|
||||
*/
|
||||
#define STM32_BOARD_USEHSE 1
|
||||
#define STM32_BOARD_XTAL 8000000
|
||||
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
|
||||
|
||||
#define STM32_HSI_FREQUENCY 16000000ul
|
||||
#define STM32_LSI_FREQUENCY 32000
|
||||
|
||||
/* Main PLL Configuration */
|
||||
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
|
||||
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(384)
|
||||
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_4
|
||||
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(8)
|
||||
#define STM32_PLLCFG_PLLR RCC_PLLCFG_PLLR(2)
|
||||
|
||||
#define STM32_RCC_PLLI2SCFGR_PLLI2SM RCC_PLLI2SCFGR_PLLI2SM(16)
|
||||
#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192)
|
||||
#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2)
|
||||
#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2)
|
||||
#define STM32_RCC_PLLI2SCFGR_PLLI2SSRC RCC_PLLI2SCFGR_PLLI2SSRC(0) /* HSE or HSI depending on PLLSRC of PLLCFGR*/
|
||||
|
||||
#define STM32_RCC_DCKCFGR2_CK48MSEL RCC_DCKCFGR2_CK48MSEL_PLL
|
||||
#define STM32_RCC_DCKCFGR2_FMPI2C1SEL RCC_DCKCFGR2_FMPI2C1SEL_APB
|
||||
#define STM32_RCC_DCKCFGR2_SDIOSEL RCC_DCKCFGR2_SDIOSEL_48MHZ
|
||||
|
||||
#define STM32_SYSCLK_FREQUENCY 96000000ul
|
||||
|
||||
/* AHB clock (HCLK) is SYSCLK (96MHz) */
|
||||
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */
|
||||
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
|
||||
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* Same as above, to satisfy compiler */
|
||||
|
||||
/* APB1 clock (PCLK1) is HCLK/2 (48MHz) */
|
||||
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 /* PCLK1 = HCLK / 2 */
|
||||
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* Timers driven from APB1 will be twice PCLK1 (see page 112 of reference manual) */
|
||||
#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
|
||||
/* APB2 clock (PCLK2) is HCLK (96MHz) */
|
||||
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK /* PCLK2 = HCLK */
|
||||
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY)
|
||||
|
||||
/* Timers driven from APB2 will be PCLK2 since no prescale division */
|
||||
#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM9_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM10_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM11_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
|
||||
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx otherwise frequency is 2xAPBx. */
|
||||
#define BOARD_TIM2_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM3_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM4_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM5_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM6_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM7_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
|
||||
#define BOARD_TIM8_FREQUENCY (2 * STM32_PCLK2_FREQUENCY)
|
||||
|
||||
/* Alternate function pin selections ************************************************/
|
||||
|
||||
/* UARTs */
|
||||
#define GPIO_USART1_RX GPIO_USART1_RX_2
|
||||
#define GPIO_USART1_TX GPIO_USART1_TX_3
|
||||
|
||||
#define GPIO_USART2_RX GPIO_USART2_RX_1
|
||||
#define GPIO_USART2_TX GPIO_USART2_TX_1
|
||||
|
||||
/* CAN */
|
||||
#define GPIO_CAN1_RX GPIO_CAN1_RX_1
|
||||
#define GPIO_CAN1_TX GPIO_CAN1_TX_1
|
||||
|
||||
/* I2C */
|
||||
|
||||
#define GPIO_MCU_I2C1_SCL
|
||||
#define GPIO_MCU_I2C1_SDA
|
||||
|
||||
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1
|
||||
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1
|
||||
|
||||
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN6)
|
||||
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN7)
|
||||
|
||||
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1
|
||||
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_4
|
||||
|
||||
#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9)
|
||||
#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10)
|
||||
|
||||
/* SPI */
|
||||
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1
|
||||
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1
|
||||
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1
|
||||
|
||||
#endif /* __ARCH_BOARD_BOARD_H */
|
||||
@@ -0,0 +1,43 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
// DMA1 Channel/Stream Selections
|
||||
//--------------------------------------------//---------------------------//----------------
|
||||
|
||||
|
||||
// DMA2 Channel/Stream Selections
|
||||
//--------------------------------------------//---------------------------//----------------
|
||||
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_2 // DMA2, Stream 2, Channel 3
|
||||
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 5, Channel 3
|
||||
@@ -0,0 +1,164 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DISABLE_OS_API is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
# CONFIG_NSH_DISABLEBG is not set
|
||||
# CONFIG_NSH_DISABLESCRIPT is not set
|
||||
# CONFIG_NSH_DISABLE_DF is not set
|
||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||
# CONFIG_NSH_DISABLE_GET is not set
|
||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
# CONFIG_STM32_DMACAPABLE is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||
CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F412CE=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CLOCK_MONOTONIC=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_HARDFAULT_ALERT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_MAXSIZE=1024
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_FDCLONE_STDIO=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_CROMFS=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
CONFIG_GRAN_INTR=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_RESET=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=750
|
||||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BYTE_WRITE=y
|
||||
CONFIG_MTD_PARTITION=y
|
||||
CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NAME_MAX=40
|
||||
CONFIG_NFILE_DESCRIPTORS=12
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_ARCHROMFS=y
|
||||
CONFIG_NSH_ARGCAT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_CMDPARMS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_MB=y
|
||||
CONFIG_NSH_DISABLE_MH=y
|
||||
CONFIG_NSH_DISABLE_MW=y
|
||||
CONFIG_NSH_DISABLE_TELNETD=y
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_NESTDEPTH=8
|
||||
CONFIG_NSH_QUOTE=y
|
||||
CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAMTRON_WRITEWAIT=y
|
||||
CONFIG_RAM_SIZE=262144
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RTC_DATETIME=y
|
||||
CONFIG_SCHED_ATEXIT=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=249
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=1280
|
||||
CONFIG_SCHED_INSTRUMENTATION=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_LPWORKPRIORITY=50
|
||||
CONFIG_SCHED_LPWORKSTACKSIZE=1632
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SEM_NNESTPRIO=8
|
||||
CONFIG_SEM_PREALLOCHOLDERS=0
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SIG_SIGALRM_ACTION=y
|
||||
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||
CONFIG_SIG_SIGWORK=4
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=30
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_STDIO_BUFFER_SIZE=32
|
||||
CONFIG_STM32_ADC1=y
|
||||
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
|
||||
CONFIG_STM32_DMA1=y
|
||||
CONFIG_STM32_DMA2=y
|
||||
CONFIG_STM32_FLASH_PREFETCH=y
|
||||
CONFIG_STM32_FLOWCONTROL_BROKEN=y
|
||||
CONFIG_STM32_I2C1=y
|
||||
CONFIG_STM32_I2C2=y
|
||||
CONFIG_STM32_JTAG_SW_ENABLE=y
|
||||
CONFIG_STM32_PWR=y
|
||||
CONFIG_STM32_RTC=y
|
||||
CONFIG_STM32_RTC_HSECLOCK=y
|
||||
CONFIG_STM32_RTC_MAGIC=0xfacefeee
|
||||
CONFIG_STM32_RTC_MAGIC_REG=1
|
||||
CONFIG_STM32_RTC_MAGIC_TIME_SET=0xfacefeef
|
||||
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
|
||||
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
|
||||
CONFIG_STM32_SPI1=y
|
||||
CONFIG_STM32_SPI1_DMA=y
|
||||
CONFIG_STM32_SPI1_DMA_BUFFER=1024
|
||||
CONFIG_STM32_SPI_DMA=y
|
||||
CONFIG_STM32_TIM8=y
|
||||
CONFIG_STM32_USART1=y
|
||||
CONFIG_STM32_USART2=y
|
||||
CONFIG_STM32_USART_BREAKS=y
|
||||
CONFIG_STM32_WWDG=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_USART1_BAUD=57600
|
||||
CONFIG_USART1_RXBUFSIZE=600
|
||||
CONFIG_USART1_TXBUFSIZE=1100
|
||||
CONFIG_USART2_BAUD=57600
|
||||
CONFIG_USART2_RXBUFSIZE=600
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USART2_TXBUFSIZE=1100
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
CONFIG_USERMAIN_STACKSIZE=2624
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
@@ -0,0 +1,134 @@
|
||||
/****************************************************************************
|
||||
* nuttx-config/scripts/canbootloader_script.ld
|
||||
*
|
||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and
|
||||
* 256Kb of SRAM. SRAM is split up into three blocks:
|
||||
*
|
||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||
* 3) 64Kb of SRAM beginning at address 0x2002:0000
|
||||
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
||||
*
|
||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||
* where the code expects to begin execution by jumping to the entry point in
|
||||
* the 0x0800:0000 address range.
|
||||
*
|
||||
* The first 0x10000 of flash is reserved for the bootloader.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
|
||||
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
|
||||
EXTERN(_vectors) /* force the vectors to be included in the output */
|
||||
|
||||
/*
|
||||
* Ensure that abort() is present in the final object. The exception handling
|
||||
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
|
||||
*/
|
||||
EXTERN(abort)
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
/*
|
||||
* Init functions (static constructors and the like)
|
||||
*/
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(.init_array .init_array.*))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
/****************************************************************************
|
||||
* scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and
|
||||
* 256Kb of SRAM. SRAM is split up into three blocks:
|
||||
*
|
||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
||||
* 3) 64Kb of SRAM beginning at address 0x2002:0000
|
||||
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
|
||||
*
|
||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||
* where the code expects to begin execution by jumping to the entry point in
|
||||
* the 0x0800:0000 address range.
|
||||
*
|
||||
* The first 0x10000 of flash is reserved for the bootloader.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x08010000, LENGTH = 448K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
|
||||
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
|
||||
EXTERN(_vectors) /* force the vectors to be included in the output */
|
||||
|
||||
/*
|
||||
* Ensure that abort() is present in the final object. The exception handling
|
||||
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
|
||||
*/
|
||||
EXTERN(abort)
|
||||
EXTERN(_bootdelay_signature)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
. = ALIGN(8);
|
||||
/*
|
||||
* This section positions the app_descriptor_t used
|
||||
* by the make_can_boot_descriptor.py tool to set
|
||||
* the application image's descriptor so that the
|
||||
* uavcan bootloader has the ability to validate the
|
||||
* image crc, size etc
|
||||
*/
|
||||
KEEP(*(.app_descriptor))
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
/*
|
||||
* Init functions (static constructors and the like)
|
||||
*/
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(.init_array .init_array.*))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2020 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
if("${PX4_BOARD_LABEL}" STREQUAL "canbootloader")
|
||||
|
||||
add_library(drivers_board
|
||||
boot_config.h
|
||||
boot.c
|
||||
led.c
|
||||
led.h
|
||||
)
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
canbootloader
|
||||
)
|
||||
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/canbootloader)
|
||||
|
||||
else()
|
||||
add_library(drivers_board
|
||||
can.c
|
||||
i2c.cpp
|
||||
init.c
|
||||
led.c
|
||||
spi.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
arch_spi
|
||||
drivers__led # drv_led_start
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
px4_layer
|
||||
arch_io_pins
|
||||
)
|
||||
endif()
|
||||
@@ -0,0 +1,115 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file board_config.h
|
||||
*
|
||||
* board internal definitions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* BUTTON */
|
||||
#define GPIO_BTN_SAFETY /* PB15 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTB|GPIO_PIN15)
|
||||
|
||||
/* Safety LED */
|
||||
#define GPIO_LED_SAFETY /* PA1 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN1)
|
||||
|
||||
/* Tone alarm output. */
|
||||
#define TONE_ALARM_TIMER 2 /* timer 2 */
|
||||
#define TONE_ALARM_CHANNEL 1 /* channel 1 */
|
||||
#define GPIO_TONE_ALARM_IDLE /* PA0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN0)
|
||||
#define GPIO_TONE_ALARM /* PA0 */ (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0)
|
||||
|
||||
/* CAN Silent mode control */
|
||||
#define GPIO_CAN1_SILENT_S0 /* PB12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN12)
|
||||
|
||||
/* CAN termination software control */
|
||||
#define GPIO_CAN1_TERMINATION /* PB13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN13)
|
||||
|
||||
/* ICM42688p FSYNC */
|
||||
#define GPIO_42688P_FSYNC /* PB8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8)
|
||||
|
||||
/* Boot config */
|
||||
#define GPIO_BOOT_CONFIG /* PC15 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN15|GPIO_EXTI)
|
||||
|
||||
/* LEDs are driven with open drain to support Anode to 5V or 3.3V */
|
||||
#define GPIO_TIM1_CH1 /* PA8 */ (GPIO_TIM1_CH1_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
|
||||
#define GPIO_TIM1_CH2 /* PA9 */ (GPIO_TIM1_CH2_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
|
||||
#define GPIO_TIM1_CH3 /* PA10 */ (GPIO_TIM1_CH3_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
|
||||
|
||||
#define GPIO_I2C1_SCL_RESET /* PB6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN6)
|
||||
#define GPIO_I2C1_SDA_RESET /* PB7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN7)
|
||||
|
||||
#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
|
||||
#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9)
|
||||
|
||||
#define FLASH_BASED_PARAMS
|
||||
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 3 /* use timer 3 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
|
||||
|
||||
#define PX4_GPIO_INIT_LIST { \
|
||||
GPIO_BTN_SAFETY, \
|
||||
GPIO_LED_SAFETY, \
|
||||
GPIO_I2C1_SCL_RESET, \
|
||||
GPIO_I2C1_SDA_RESET, \
|
||||
GPIO_I2C2_SCL_RESET, \
|
||||
GPIO_I2C2_SDA_RESET, \
|
||||
GPIO_42688P_FSYNC, \
|
||||
GPIO_BOOT_CONFIG, \
|
||||
GPIO_CAN1_TX, \
|
||||
GPIO_CAN1_RX, \
|
||||
GPIO_CAN1_SILENT_S0, \
|
||||
GPIO_CAN1_TERMINATION, \
|
||||
}
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define BOARD_HAS_N_S_RGB_LED 1
|
||||
#define BOARD_MAX_LEDS BOARD_HAS_N_S_RGB_LED
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern void stm32_spiinitialize(void);
|
||||
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
__END_DECLS
|
||||
@@ -0,0 +1,188 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
* Author: Ben Dyer <ben_dyer@mac.com>
|
||||
* Pavel Kirienko <pavel.kirienko@zubax.com>
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <stdint.h>
|
||||
#include "boot_config.h"
|
||||
#include "board.h"
|
||||
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include "led.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following entry point. This entry point
|
||||
* is called early in the initialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
putreg32(getreg32(STM32_RCC_APB1ENR) | RCC_APB1ENR_CAN1EN, STM32_RCC_APB1ENR);
|
||||
stm32_configgpio(GPIO_CAN1_RX);
|
||||
stm32_configgpio(GPIO_CAN1_TX);
|
||||
stm32_configgpio(GPIO_CAN1_SILENT_S0);
|
||||
stm32_configgpio(GPIO_CAN1_TERMINATION);
|
||||
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
|
||||
putreg32(getreg32(STM32_RCC_APB1RSTR) & ~RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
|
||||
|
||||
#if defined(OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO)
|
||||
stm32_configgpio(GPIO_GETNODEINFO_JUMPER);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_deinitialize
|
||||
*
|
||||
* Description:
|
||||
* This function is called by the bootloader code prior to booting
|
||||
* the application. Is should place the HW into an benign initialized state.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void board_deinitialize(void)
|
||||
{
|
||||
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_get_product_name
|
||||
*
|
||||
* Description:
|
||||
* Called to retrieve the product name. The returned value is a assumed
|
||||
* to be written to a pascal style string that will be length prefixed
|
||||
* and not null terminated
|
||||
*
|
||||
* Input Parameters:
|
||||
* product_name - A pointer to a buffer to write the name.
|
||||
* maxlen - The maximum number of charter that can be written
|
||||
*
|
||||
* Returned Value:
|
||||
* The length of characters written to the buffer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t board_get_product_name(uint8_t *product_name, size_t maxlen)
|
||||
{
|
||||
DEBUGASSERT(maxlen > UAVCAN_STRLEN(HW_UAVCAN_NAME));
|
||||
memcpy(product_name, HW_UAVCAN_NAME, UAVCAN_STRLEN(HW_UAVCAN_NAME));
|
||||
return UAVCAN_STRLEN(HW_UAVCAN_NAME);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_get_hardware_version
|
||||
*
|
||||
* Description:
|
||||
* Called to retrieve the hardware version information. The function
|
||||
* will first initialize the the callers struct to all zeros.
|
||||
*
|
||||
* Input Parameters:
|
||||
* hw_version - A pointer to a uavcan_hardwareversion_t.
|
||||
*
|
||||
* Returned Value:
|
||||
* Length of the unique_id
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
size_t board_get_hardware_version(uavcan_HardwareVersion_t *hw_version)
|
||||
{
|
||||
memset(hw_version, 0, sizeof(uavcan_HardwareVersion_t));
|
||||
|
||||
hw_version->major = HW_VERSION_MAJOR;
|
||||
hw_version->minor = HW_VERSION_MINOR;
|
||||
|
||||
return board_get_mfguid(*(mfguid_t *) hw_version->unique_id);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_indicate
|
||||
*
|
||||
* Description:
|
||||
* Provides User feedback to indicate the state of the bootloader
|
||||
* on board specific hardware.
|
||||
*
|
||||
* Input Parameters:
|
||||
* indication - A member of the uiindication_t
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
#define led(n, code, r , g , b, h) {.red = (r),.green = (g), .blue = (b),.hz = (h)}
|
||||
|
||||
typedef begin_packed_struct struct led_t {
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
uint8_t blue;
|
||||
uint8_t hz;
|
||||
} end_packed_struct led_t;
|
||||
|
||||
static const led_t i2l[] = {
|
||||
|
||||
led(0, off, 0, 0, 0, 0),
|
||||
led(1, reset, 128, 128, 128, 30),
|
||||
led(2, autobaud_start, 0, 128, 0, 1),
|
||||
led(3, autobaud_end, 0, 128, 0, 2),
|
||||
led(4, allocation_start, 0, 0, 64, 2),
|
||||
led(5, allocation_end, 0, 128, 64, 3),
|
||||
led(6, fw_update_start, 32, 128, 64, 3),
|
||||
led(7, fw_update_erase_fail, 32, 128, 32, 3),
|
||||
led(8, fw_update_invalid_response, 64, 0, 0, 1),
|
||||
led(9, fw_update_timeout, 64, 0, 0, 2),
|
||||
led(a, fw_update_invalid_crc, 64, 0, 0, 4),
|
||||
led(b, jump_to_app, 0, 128, 0, 10),
|
||||
|
||||
};
|
||||
|
||||
void board_indicate(uiindication_t indication)
|
||||
{
|
||||
rgb_led(i2l[indication].red,
|
||||
i2l[indication].green,
|
||||
i2l[indication].blue,
|
||||
i2l[indication].hz);
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* @file boot_config.h
|
||||
*
|
||||
* bootloader definitions that configures the behavior and options
|
||||
* of the Boot loader
|
||||
* This file is relies on the parent folder's boot_config.h file and defines
|
||||
* different usages of the hardware for bootloading
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
/* Bring in the board_config.h definitions
|
||||
* todo:make this be pulled in from a targed's build
|
||||
* files in nuttx*/
|
||||
|
||||
#include "board_config.h"
|
||||
#include "uavcan.h"
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stm32_flash.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define OPT_PREFERRED_NODE_ID ANY_NODE_ID
|
||||
|
||||
//todo:wrap OPT_x in in ifdefs for command line definitions
|
||||
#define OPT_TBOOT_MS 5000
|
||||
#define OPT_NODE_STATUS_RATE_MS 800
|
||||
#define OPT_NODE_INFO_RATE_MS 50
|
||||
#define OPT_BL_NUMBER_TIMERS 7
|
||||
|
||||
/*
|
||||
* This Option set is set to 1 ensure a provider of firmware has an
|
||||
* opportunity update the node's firmware.
|
||||
* This Option is the default policy and can be overridden by
|
||||
* a jumper
|
||||
* When this Policy is set, the node will ignore tboot and
|
||||
* wait indefinitely for a GetNodeInfo request before booting.
|
||||
*
|
||||
* OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT is used to allow
|
||||
* the polarity of the jumper to be True Active
|
||||
*
|
||||
* wait OPT_WAIT_FOR_GETNODEINFO OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO
|
||||
* Jumper
|
||||
* yes 1 0 x
|
||||
* yes 1 1 Active
|
||||
* no 1 1 Not Active
|
||||
* no 0 0 X
|
||||
* yes 0 1 Active
|
||||
* no 0 1 Not Active
|
||||
*
|
||||
*/
|
||||
#define OPT_WAIT_FOR_GETNODEINFO 0
|
||||
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO 1
|
||||
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 0
|
||||
|
||||
#define OPT_ENABLE_WD 1
|
||||
|
||||
#define OPT_RESTART_TIMEOUT_MS 20000
|
||||
|
||||
/* Reserved for the Booloader */
|
||||
#define OPT_BOOTLOADER_SIZE_IN_K (1024*64)
|
||||
|
||||
/* Reserved for the application out of the total
|
||||
* system flash minus the BOOTLOADER_SIZE_IN_K
|
||||
*/
|
||||
#define OPT_APPLICATION_RESERVER_IN_K 0
|
||||
|
||||
#define OPT_APPLICATION_IMAGE_OFFSET OPT_BOOTLOADER_SIZE_IN_K
|
||||
#define OPT_APPLICATION_IMAGE_LENGTH (FLASH_SIZE-(OPT_BOOTLOADER_SIZE_IN_K+OPT_APPLICATION_RESERVER_IN_K))
|
||||
|
||||
|
||||
#define FLASH_BASE STM32_FLASH_BASE
|
||||
#define FLASH_SIZE STM32_FLASH_SIZE
|
||||
|
||||
#define APPLICATION_LOAD_ADDRESS (FLASH_BASE + OPT_APPLICATION_IMAGE_OFFSET)
|
||||
#define APPLICATION_SIZE (FLASH_SIZE-OPT_APPLICATION_IMAGE_OFFSET)
|
||||
#define APPLICATION_LAST_8BIT_ADDRRESS ((uint8_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint8_t)))
|
||||
#define APPLICATION_LAST_32BIT_ADDRRESS ((uint32_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint32_t)))
|
||||
#define APPLICATION_LAST_64BIT_ADDRRESS ((uint64_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint64_t)))
|
||||
|
||||
/* If this board uses big flash that have large sectors */
|
||||
|
||||
#define OPT_USE_YIELD
|
||||
|
||||
/* Bootloader Option*****************************************************************
|
||||
*
|
||||
*/
|
||||
#define GPIO_GETNODEINFO_JUMPER (GPIO_BOOT_CONFIG & ~GPIO_EXTI)
|
||||
@@ -0,0 +1,130 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file can.c
|
||||
*
|
||||
* Board-specific CAN functions.
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/can/can.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "arm_arch.h"
|
||||
|
||||
#include "stm32.h"
|
||||
#include "stm32_can.h"
|
||||
#include "board_config.h"
|
||||
|
||||
#ifdef CONFIG_CAN
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
/* Configuration ********************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2)
|
||||
# warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1."
|
||||
# undef CONFIG_STM32_CAN2
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_CAN1
|
||||
# define CAN_PORT 1
|
||||
#else
|
||||
# define CAN_PORT 2
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
int can_devinit(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: can_devinit
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following interface to work with
|
||||
* examples/can.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int can_devinit(void)
|
||||
{
|
||||
static bool initialized = false;
|
||||
struct can_dev_s *can;
|
||||
int ret;
|
||||
|
||||
/* Check if we have already initialized */
|
||||
|
||||
if (!initialized) {
|
||||
/* Call stm32_caninitialize() to get an instance of the CAN interface */
|
||||
|
||||
can = stm32_caninitialize(CAN_PORT);
|
||||
|
||||
if (can == NULL) {
|
||||
canerr("ERROR: Failed to get CAN interface\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Register the CAN driver at "/dev/can0" */
|
||||
|
||||
ret = can_register("/dev/can0", can);
|
||||
|
||||
if (ret < 0) {
|
||||
canerr("ERROR: can_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Now we are initialized */
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/i2c_hw_description.h>
|
||||
|
||||
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
initI2CBusInternal(1),
|
||||
initI2CBusInternal(2),
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file init.c
|
||||
*
|
||||
* board specific early startup code. This file implements the
|
||||
* board_app_initialize() function that is called early by nsh during startup.
|
||||
*
|
||||
* Code here is run before the rcS script is invoked; it should start required
|
||||
* subsystems and perform board-specific initialization.
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include <stm32.h>
|
||||
#include "board_config.h"
|
||||
#include <stm32_uart.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_board_led.h>
|
||||
#include <drivers/drv_watchdog.h>
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
|
||||
#include <px4_platform_common/init.h>
|
||||
#include <px4_platform/gpio.h>
|
||||
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following entry point. This entry point
|
||||
* is called early in the initialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
watchdog_init();
|
||||
|
||||
/* configure pins */
|
||||
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
|
||||
px4_gpio_init(gpio, arraySize(gpio));
|
||||
|
||||
// Configure SPI all interfaces GPIO & enable power.
|
||||
stm32_spiinitialize();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initalization logic and the the
|
||||
* matching application logic. The value cold be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
px4_platform_init();
|
||||
|
||||
#if defined(FLASH_BASED_PARAMS)
|
||||
static sector_descriptor_t params_sector_map[] = {
|
||||
{2, 16 * 1024, 0x08008000},
|
||||
{3, 16 * 1024, 0x0800C000},
|
||||
{0, 0, 0},
|
||||
};
|
||||
|
||||
/* Initialize the flashfs layer to use heap allocated memory */
|
||||
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
|
||||
|
||||
if (result != OK) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif // FLASH_BASED_PARAMS
|
||||
|
||||
/* Configure the HW based on the manifest */
|
||||
|
||||
px4_platform_configure();
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file led.c
|
||||
*
|
||||
* LED backend.
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "board_config.h"
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "led.h"
|
||||
|
||||
#define TMR_BASE STM32_TIM1_BASE
|
||||
#define TMR_FREQUENCY STM32_APB2_TIM1_CLKIN
|
||||
#define TMR_REG(o) (TMR_BASE+(o))
|
||||
|
||||
void rgb_led(int r, int g, int b, int freqs)
|
||||
{
|
||||
|
||||
long fosc = TMR_FREQUENCY;
|
||||
long prescale = 2048;
|
||||
long p1s = fosc / prescale;
|
||||
long p0p5s = p1s / 2;
|
||||
uint16_t val;
|
||||
static bool once = 0;
|
||||
|
||||
if (!once) {
|
||||
once = 1;
|
||||
|
||||
/* Enabel Clock to Block */
|
||||
modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN);
|
||||
|
||||
/* Reload */
|
||||
|
||||
val = getreg16(TMR_REG(STM32_BTIM_EGR_OFFSET));
|
||||
val |= ATIM_EGR_UG;
|
||||
putreg16(val, TMR_REG(STM32_BTIM_EGR_OFFSET));
|
||||
|
||||
/* Set Prescaler STM32_TIM_SETCLOCK */
|
||||
|
||||
putreg16(prescale, TMR_REG(STM32_BTIM_PSC_OFFSET));
|
||||
|
||||
/* Enable STM32_TIM_SETMODE*/
|
||||
|
||||
putreg16(ATIM_CR1_CEN | ATIM_CR1_ARPE, TMR_REG(STM32_BTIM_CR1_OFFSET));
|
||||
|
||||
|
||||
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC1M_SHIFT) | ATIM_CCMR1_OC1PE |
|
||||
(ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC2M_SHIFT) | ATIM_CCMR1_OC2PE, TMR_REG(STM32_GTIM_CCMR1_OFFSET));
|
||||
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR2_OC3M_SHIFT) | ATIM_CCMR2_OC3PE, TMR_REG(STM32_GTIM_CCMR2_OFFSET));
|
||||
putreg16(ATIM_CCER_CC3E | ATIM_CCER_CC3P |
|
||||
ATIM_CCER_CC2E | ATIM_CCER_CC2P |
|
||||
ATIM_CCER_CC1E | ATIM_CCER_CC1P, TMR_REG(STM32_GTIM_CCER_OFFSET));
|
||||
|
||||
|
||||
stm32_configgpio(GPIO_TIM1_CH1);
|
||||
stm32_configgpio(GPIO_TIM1_CH2);
|
||||
stm32_configgpio(GPIO_TIM1_CH3);
|
||||
|
||||
/* master output enable = on */
|
||||
putreg16(ATIM_BDTR_MOE, (TMR_REG(STM32_ATIM_BDTR_OFFSET)));
|
||||
}
|
||||
|
||||
long p = freqs == 0 ? p1s : p1s / freqs;
|
||||
putreg32(p, TMR_REG(STM32_BTIM_ARR_OFFSET));
|
||||
|
||||
p = freqs == 0 ? p1s + 1 : p0p5s / freqs;
|
||||
|
||||
putreg32((r * p) / 255, TMR_REG(STM32_GTIM_CCR1_OFFSET));
|
||||
putreg32((g * p) / 255, TMR_REG(STM32_GTIM_CCR2_OFFSET));
|
||||
putreg32((b * p) / 255, TMR_REG(STM32_GTIM_CCR3_OFFSET));
|
||||
|
||||
val = getreg16(TMR_REG(STM32_BTIM_CR1_OFFSET));
|
||||
|
||||
if (freqs == 0) {
|
||||
val &= ~ATIM_CR1_CEN;
|
||||
|
||||
} else {
|
||||
val |= ATIM_CR1_CEN;
|
||||
}
|
||||
|
||||
putreg16(val, TMR_REG(STM32_BTIM_CR1_OFFSET));
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2015 PX4 Development Team. All rights reserved.
|
||||
* Author: David Sidrane<david_s5@nscdg.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
__BEGIN_DECLS
|
||||
void rgb_led(int r, int g, int b, int freqs);
|
||||
__END_DECLS
|
||||
@@ -0,0 +1,44 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/spi_hw_description.h>
|
||||
#include <drivers/drv_sensor.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortB, GPIO::Pin0}, SPI::DRDY{GPIO::PortB, GPIO::Pin1}),
|
||||
}),
|
||||
};
|
||||
|
||||
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
||||
@@ -0,0 +1,17 @@
|
||||
# UAVCAN boot loadable Module ID
|
||||
set(uavcanblid_sw_version_major 0)
|
||||
set(uavcanblid_sw_version_minor 1)
|
||||
add_definitions(
|
||||
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
|
||||
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
|
||||
)
|
||||
|
||||
set(uavcanblid_hw_version_major 0)
|
||||
set(uavcanblid_hw_version_minor 81)
|
||||
set(uavcanblid_name "\"org.ark.can-gps\"")
|
||||
|
||||
add_definitions(
|
||||
-DHW_UAVCAN_NAME=${uavcanblid_name}
|
||||
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
|
||||
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||
)
|
||||
@@ -39,7 +39,6 @@ px4_add_board(
|
||||
VENDOR atlflight
|
||||
MODEL eagle
|
||||
LABEL default
|
||||
#TESTING
|
||||
TOOLCHAIN arm-linux-gnueabihf
|
||||
ROMFSROOT px4fmu_common
|
||||
DRIVERS
|
||||
@@ -55,6 +54,7 @@ px4_add_board(
|
||||
pwm_out_sim
|
||||
qshell/posix
|
||||
rc_input
|
||||
smart_battery/batmon
|
||||
#telemetry # all available telemetry drivers
|
||||
MODULES
|
||||
airspeed_selector
|
||||
@@ -108,7 +108,6 @@ px4_add_board(
|
||||
sd_bench
|
||||
shutdown
|
||||
system_time
|
||||
#tests # tests and test runner
|
||||
#top
|
||||
topic_listener
|
||||
tune_control
|
||||
|
||||
@@ -49,7 +49,7 @@ px4_add_board(
|
||||
imu/invensense/mpu9250
|
||||
#magnetometer/hmc5883
|
||||
qshell/qurt
|
||||
spektrum_rc
|
||||
snapdragon_spektrum_rc
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
|
||||
@@ -39,7 +39,6 @@ px4_add_board(
|
||||
VENDOR atlflight
|
||||
MODEL excelsior
|
||||
LABEL default
|
||||
#TESTING
|
||||
TOOLCHAIN arm-oemllib32-linux-gnueabi
|
||||
DRIVERS
|
||||
#barometer # all available barometer drivers
|
||||
@@ -54,6 +53,7 @@ px4_add_board(
|
||||
pwm_out_sim
|
||||
qshell/posix
|
||||
rc_input
|
||||
smart_battery/batmon
|
||||
#telemetry # all available telemetry drivers
|
||||
MODULES
|
||||
airspeed_selector
|
||||
@@ -106,7 +106,6 @@ px4_add_board(
|
||||
sd_bench
|
||||
shutdown
|
||||
system_time
|
||||
#tests # tests and test runner
|
||||
#top
|
||||
topic_listener
|
||||
tune_control
|
||||
|
||||
@@ -49,7 +49,7 @@ px4_add_board(
|
||||
imu/invensense/mpu9250
|
||||
magnetometer/hmc5883
|
||||
qshell/qurt
|
||||
spektrum_rc
|
||||
snapdragon_spektrum_rc
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
|
||||
@@ -7,7 +7,6 @@ px4_add_board(
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m7
|
||||
ROMFSROOT px4fmu_common
|
||||
TESTING
|
||||
UAVCAN_INTERFACES 2
|
||||
ETHERNET
|
||||
SERIAL_PORTS
|
||||
@@ -46,8 +45,8 @@ px4_add_board(
|
||||
rc_input
|
||||
roboclaw
|
||||
rpm
|
||||
smart_battery/batmon
|
||||
telemetry # all available telemetry drivers
|
||||
test_ppm
|
||||
#tone_alarm
|
||||
uavcan
|
||||
MODULES
|
||||
@@ -108,7 +107,6 @@ px4_add_board(
|
||||
sd_bench
|
||||
serial_test
|
||||
system_time
|
||||
tests # tests and test runner
|
||||
top
|
||||
topic_listener
|
||||
tune_control
|
||||
@@ -117,15 +115,15 @@ px4_add_board(
|
||||
work_queue
|
||||
EXAMPLES
|
||||
fake_gps
|
||||
fake_gyro
|
||||
fake_magnetometer
|
||||
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
hello
|
||||
hwtest # Hardware test
|
||||
#fake_imu
|
||||
#fake_magnetometer
|
||||
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
|
||||
#hello
|
||||
#hwtest # Hardware test
|
||||
#matlab_csv_serial
|
||||
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
|
||||
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
|
||||
rover_steering_control # Rover example app
|
||||
uuv_example_app
|
||||
work_item
|
||||
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
|
||||
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
|
||||
#rover_steering_control # Rover example app
|
||||
#uuv_example_app
|
||||
#work_item
|
||||
)
|
||||
|
||||
@@ -143,6 +143,7 @@ CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_TELNET=y
|
||||
CONFIG_NSH_TELNET_LOGIN=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user