title: Setting entrypoints and sections in radare2
body: <p>I am currently trying to follow <a href="https://boredpentester.com/reversing-esp8266-firmware-part-1/" rel="nofollow noreferrer">this tutorial</a> to reverse engineer an esp8266-01 firmware dump I retrieved from flash. 
  The esp8266 processor is based on the Tensilica Xtensa and radare2 supports its instruction set when started with the <code>-a xtensa</code> flag. From the tutorial I also know that the following segments exist (quote from above link):</p>
  
  <p><code>0x40100000 – Instruction RAM. Used by bootloader to load SPI Flash &lt;40000h
   0x3FFE8000 – User data RAM. Available to applications.
   0x3FFFFFFF – Anything below this address appears to be data, not code
   0×40100000 – Anything above this address appears to be code, not data</code></p>
  
  <p>I know that the entry point is contained within the header of the file, and in my case is 0x4010f29c. 
  Now to my question: How do I go about telling radare2 all of these values and map the segments correctly? All I've come up with so far is to map the file like so: 
  <code>radare2 -a xtensa -m 0x4010f29c flash.bin</code> but I'm pretty sure that's not really what I want.</p>
  
  <p>Thank you so much in advance! &lt;3</p>