forked from apache/mynewt-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/bsp/stm32f4: Add CCM region to linker script
This adds memory memory_regions.ld.h for device that have CCM. MCU stack is also placed in CCM memory instead of RAM region. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
- Loading branch information
Showing
12 changed files
with
348 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
25 changes: 25 additions & 0 deletions
25
hw/bsp/ada_feather_stm32f405/link/include/memory_regions.ld.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |
33 changes: 33 additions & 0 deletions
33
hw/bsp/olimex_stm32-e407_devboard/link/include/mcu_config.ld.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
25 changes: 25 additions & 0 deletions
25
hw/bsp/olimex_stm32-e407_devboard/link/include/memory_regions.ld.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Memory regions placed in CCM | ||
* If stack or core data or other section should be place in RAM | ||
* <target_name>/link/include/target_config.ld.h should just do: | ||
* #undef BSSNZ_RAM | ||
* #undef COREBSS_RAM | ||
* #undef COREDATA_RAM | ||
* #undef STACK_REGION | ||
*/ | ||
|
||
#define BSSNZ_RAM CCM | ||
#define COREBSS_RAM CCM | ||
#define COREDATA_RAM CCM | ||
#define STACK_REGION CCM |
25 changes: 25 additions & 0 deletions
25
hw/bsp/stm32f429discovery/link/include/memory_regions.ld.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifdef STACK_REGION | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (64K - STACK_SIZE) | ||
STACK_RAM (rw) : ORIGIN = 0x10010000 - STACK_SIZE, LENGTH = STACK_SIZE | ||
#else | ||
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K | ||
#endif |