Index: emcore/trunk/tools/emcore.py |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | def getinfo(self, infotype):
|
158 | 158 | """
|
159 | 159 | Get info on the running emCORE.
|
160 | | - <infotype> may be either of 'version', 'packetsize', 'usermemrange'.
|
| 160 | + <infotype> may be either of 'version', 'packetsize', 'mallocpoolbounds'.
|
161 | 161 | """
|
162 | 162 | if infotype == "version":
|
163 | 163 | hwtype = gethwname(self.emcore.lib.dev.hwtypeid)
|
— | — | @@ -175,14 +175,14 @@ |
176 | 176 | self.logger.info("data out: %d\n" % self.emcore.lib.dev.packetsizelimit.dout, 4)
|
177 | 177 | self.logger.info("data in: %d\n" % self.emcore.lib.dev.packetsizelimit.din, 4)
|
178 | 178 |
|
179 | | - elif infotype == "usermemrange":
|
180 | | - resp = self.emcore.getusermemrange()
|
181 | | - self.logger.info("The user memory range is 0x%X - 0x%X" % (
|
182 | | - self.emcore.lib.dev.usermem.lower,
|
183 | | - self.emcore.lib.dev.usermem.upper - 1))
|
| 179 | + elif infotype == "mallocpoolbounds":
|
| 180 | + resp = self.emcore.getmallocpoolbounds()
|
| 181 | + self.logger.info("The malloc pool is 0x%X - 0x%X" % (
|
| 182 | + self.emcore.lib.dev.mallocpool.lower,
|
| 183 | + self.emcore.lib.dev.mallocpool.upper - 1))
|
184 | 184 |
|
185 | 185 | else:
|
186 | | - raise ArgumentTypeError("one out of 'version', 'packetsize', 'usermemrange'", infotype)
|
| 186 | + raise ArgumentTypeError("one out of 'version', 'packetsize', 'mallocpoolbounds'", infotype)
|
187 | 187 |
|
188 | 188 | @command
|
189 | 189 | def reset(self, force=False):
|
Index: emcore/trunk/tools/libemcore.py |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | raise DeviceError("Connected to unknown software type. Exiting")
|
115 | 115 |
|
116 | 116 | self.getpacketsizeinfo()
|
117 | | - self.getusermemrange()
|
| 117 | + self.getmallocpoolbounds()
|
118 | 118 |
|
119 | 119 | @staticmethod
|
120 | 120 | def _alignsplit(addr, size, blksize, align):
|
— | — | @@ -191,12 +191,12 @@ |
192 | 192 | return resp
|
193 | 193 |
|
194 | 194 | @command()
|
195 | | - def getusermemrange(self):
|
196 | | - """ This returns the memory range the user has access to. """
|
| 195 | + def getmallocpoolbounds(self):
|
| 196 | + """ This returns the memory range of the malloc pool """
|
197 | 197 | resp = self.lib.monitorcommand(struct.pack("<IIII", 1, 2, 0, 0), "III", ("lower", "upper", None))
|
198 | | - self.logger.debug("Device user memory = 0x%X - 0x%X\n" % (resp.lower, resp.upper))
|
199 | | - self.lib.dev.usermem.lower = resp.lower
|
200 | | - self.lib.dev.usermem.upper = resp.upper
|
| 198 | + self.logger.debug("Malloc pool bounds = 0x%X - 0x%X\n" % (resp.lower, resp.upper))
|
| 199 | + self.lib.dev.mallocpool.lower = resp.lower
|
| 200 | + self.lib.dev.mallocpool.upper = resp.upper
|
201 | 201 | return resp
|
202 | 202 |
|
203 | 203 | @command()
|
— | — | @@ -1037,9 +1037,9 @@ |
1038 | 1038 | self.swtypeid = None
|
1039 | 1039 | self.hwtypeid = None
|
1040 | 1040 |
|
1041 | | - self.usermem = Bunch()
|
1042 | | - self.usermem.lower = None
|
1043 | | - self.usermem.upper = None
|
| 1041 | + self.mallocpool = Bunch()
|
| 1042 | + self.mallocpool.lower = None
|
| 1043 | + self.mallocpool.upper = None
|
1044 | 1044 |
|
1045 | 1045 | def __del__(self):
|
1046 | 1046 | self.disconnect()
|