Rev 1666 | Rev 1914 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1666 | Rev 1887 | ||
|---|---|---|---|
| Line 276... | Line 276... | ||
| 276 | 276 | ||
| 277 | Code::Pointer code = Code::Pointer(new Code()); |
277 | Code::Pointer code = Code::Pointer(new Code()); |
| 278 | if (!code->LoadIntelHexFile(filename)) |
278 | if (!code->LoadIntelHexFile(filename)) |
| 279 | { |
279 | { |
| 280 | LOG.Error("Failed to parse " + filename); |
280 | LOG.Error("Failed to parse " + filename); |
| - | 281 | return false; |
|
| - | 282 | } |
|
| - | 283 | ||
| - | 284 | if (is_bios) |
|
| - | 285 | { |
|
| - | 286 | LOG.Debug("is_bios true"); |
|
| - | 287 | it->second->ProgramBios(code); |
|
| - | 288 | } |
|
| - | 289 | else |
|
| - | 290 | { |
|
| - | 291 | LOG.Debug("is_bios false"); |
|
| - | 292 | it->second->ProgramApplication(code); |
|
| - | 293 | } |
|
| - | 294 | ||
| - | 295 | return true; |
|
| - | 296 | } |
|
| - | 297 | ||
| - | 298 | /* Program node with hexdata as argument */ |
|
| - | 299 | bool Manager::ProgramNodeHex(Node::Id node_id, bool is_bios, std::string hex_data) |
|
| - | 300 | { |
|
| - | 301 | NodeList::iterator it = this->nodes_.find(node_id); |
|
| - | 302 | ||
| - | 303 | if (it == this->nodes_.end()) |
|
| - | 304 | { |
|
| - | 305 | LOG.Error("Could not find node " + node_id); |
|
| - | 306 | return false; |
|
| - | 307 | } |
|
| - | 308 | ||
| - | 309 | Code::Pointer code = Code::Pointer(new Code()); |
|
| - | 310 | if (!code->ParseIntelHex(hex_data)) |
|
| - | 311 | { |
|
| - | 312 | LOG.Error("Failed to parse hexdata " + hex_data); |
|
| 281 | return false; |
313 | return false; |
| 282 | } |
314 | } |
| 283 | 315 | ||
| 284 | if (is_bios) |
316 | if (is_bios) |
| 285 | { |
317 | { |