Skip to content

Commit 1a688f3

Browse files
author
Paul Giacopelli
committed
added temporary files to have an exemple
1 parent 6cb262a commit 1a688f3

3 files changed

Lines changed: 60 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/build/
22
/outdir/
33
*.sw?
4+
*.o
45
__pycache__/

config/products.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"p2020": {
3+
"ds": {
4+
"name": "power-qoriq-p2020-ds-p",
5+
"timer": 75e6,
6+
"hardware": [
7+
"l2sram"
8+
],
9+
"core_number": 2,
10+
"regions": [
11+
{
12+
"name": "ddr",
13+
"start": 0,
14+
"size": 2147483648
15+
},
16+
{
17+
"name": "l2sram",
18+
"start": 2147483648,
19+
"size": 524288
20+
}
21+
],
22+
"rtk_src_dir": "@QORIQ_RTK_DIR@"
23+
}
24+
}
25+
}
26+

main_test.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#! /bin/env python3
2+
3+
from products.P2020_ds import P2020_ds
4+
from utils.templates import TOP_DIR
5+
import utils.templates as globs
6+
from utils.scriptutil import run_cmd
7+
8+
FLASHLIKE = ['FLASH', 'U']
9+
test = P2020_ds()
10+
task = 'U'
11+
core = 1
12+
ag = [f'task_{task}']
13+
if task not in FLASHLIKE:
14+
ag.append(f'sends_to_task_{task}')
15+
globs.KBG_JSON = globs.APP_DIR / f'kbuildgen_{task}.json'
16+
pgrms = {}
17+
pgrms['coff'] = test.build(task, 'test_main_cOFF', core, agents=ag, max_mes=512)
18+
pgrms['con'] = test.build(task, 'test_main_cON', core, agents=ag, max_mes=512,
19+
corunner={
20+
'type': 'read',
21+
'read': '0x20000000',
22+
'size': 0x2000
23+
})
24+
def exec_pgrm(p):
25+
print(pgrms[p])
26+
f = test.genCmm({'app_elf': [pgrms[p]], 'core': core})
27+
fname = f.name
28+
print(fname)
29+
cmd = ['t32/trunner', fname, f'output/{p}.bin', 'output/times.log']
30+
run_cmd(cmd, TOP_DIR, name='trunner', timeout=None)
31+
exec_pgrm('coff')
32+
exec_pgrm('con')
33+
#input()

0 commit comments

Comments
 (0)