# Makefile targeting scratchpad

**URL:** <https://forums.sifive.com/t/makefile-targeting-scratchpad/924>\
**Category:** RISC-V\
**Created:** [December 5, 2017, 2:03am UTC](https://forums.sifive.com/t/makefile-targeting-scratchpad/924 "2017-12-05T02:03:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dong](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@dong](https://forums.sifive.com/u/dong)\
**Post date:** [December 5, 2017, 2:03am UTC](https://forums.sifive.com/t/makefile-targeting-scratchpad/924/1 "2017-12-05T02:03:51Z")

</div>

Hi there,

I am just wondering if there is any makefile available in freedom-e-sdk that targets scratchpad. There were just too many things to be linked (for example, malloc, kill) and this would not be able to fit into the scratchpad. Thanks.

---

<div class="post-metadata">

**Author:** ![DrewatSiFive](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@DrewatSiFive](https://forums.sifive.com/u/DrewatSiFive)\
**Post date:** [December 5, 2017, 2:47am UTC](https://forums.sifive.com/t/makefile-targeting-scratchpad/924/2 "2017-12-05T02:47:52Z")

</div>

What target are you compiling for? There is a scratchpad target for the coreplexip-e31-arty and coreplexip-e51-arty targets. This linker file links everything into the DTIM.

There isn’t one for the HiFive1, but we should be able to make one if that is what you are asking.

---

<div class="post-metadata">

**Author:** ![dong](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@dong](https://forums.sifive.com/u/dong)\
**Post date:** [December 5, 2017, 2:51am UTC](https://forums.sifive.com/t/makefile-targeting-scratchpad/924/3 "2017-12-05T02:51:48Z")

</div>

Oh, no worries. I thought there would be one for HiFive1, but actually it can be easy to make one. Thanks!

BTW, what exactly is DTIM (data tightly integrated memory)? Is it just caching all the instructions?

---

<div class="post-metadata">

**Author:** ![DrewatSiFive](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@DrewatSiFive](https://forums.sifive.com/u/DrewatSiFive)\
**Post date:** [December 5, 2017, 2:53am UTC](https://forums.sifive.com/t/makefile-targeting-scratchpad/924/4 "2017-12-05T02:53:59Z")

</div>

It is just a tightly integrated memory, similar to a scratchpad or TCM you may have seen on other devices. It is directly addressable and not a cache.

Let me know if you have trouble.
